Bug 824340 - DMD: fix a deadlock when getting stack traces. r=jlebar.

--HG--
extra : rebase_source : c0bb85cddb6abed0eedd49d959001a0b95667946
This commit is contained in:
Nicholas Nethercote 2012-12-23 17:35:56 -08:00
parent 650d95bc63
commit 31198c8eea

View File

@ -794,11 +794,11 @@ StackTrace::Get(Thread* aT)
// loading a shared library). So we can't be in gStateLock during the call // loading a shared library). So we can't be in gStateLock during the call
// to NS_StackWalk. For details, see // to NS_StackWalk. For details, see
// https://bugzilla.mozilla.org/show_bug.cgi?id=374829#c8 // https://bugzilla.mozilla.org/show_bug.cgi?id=374829#c8
// On Linux, something similar can happen; see bug 824340.
// So let's just release it on all platforms.
StackTrace tmp; StackTrace tmp;
{ {
#ifdef XP_WIN
AutoUnlockState unlock; AutoUnlockState unlock;
#endif
// In normal operation, skip=3 gets us past various malloc wrappers into // In normal operation, skip=3 gets us past various malloc wrappers into
// more interesting stuff. But in test mode we need to skip a bit less to // more interesting stuff. But in test mode we need to skip a bit less to
// sufficiently differentiate some similar stacks. // sufficiently differentiate some similar stacks.