Backed out changeset 7cae21b839ad (bug 1016629)

This commit is contained in:
Carsten "Tomcat" Book 2014-07-25 15:59:33 +02:00
parent e84a3adc33
commit f906a9a939

View File

@ -612,7 +612,7 @@ ThreadStackHelper::FillStackBuffer()
#endif
}
MOZ_ASAN_BLACKLIST void
void
ThreadStackHelper::FillThreadContext(void* aContext)
{
#ifdef MOZ_THREADSTACKHELPER_NATIVE
@ -757,18 +757,7 @@ ThreadStackHelper::FillThreadContext(void* aContext)
sp -= stackSize - sizeof(void*);
#endif
#ifndef MOZ_ASAN
memcpy(mContextToFill->mStack, reinterpret_cast<void*>(sp), stackSize);
#else
// ASan will flag memcpy for access outside of stack frames,
// so roll our own memcpy here.
intptr_t* dst = reinterpret_cast<intptr_t*>(&mContextToFill->mStack[0]);
const intptr_t* src = reinterpret_cast<intptr_t*>(sp);
for (intptr_t len = stackSize; len > 0; len -= sizeof(*src)) {
*(dst++) = *(src++);
}
#endif
mContextToFill->mStackBase = uintptr_t(sp);
mContextToFill->mStackSize = stackSize;
mContextToFill->mValid = true;