Bug 1077135 - Ensure logging initialization for early log messages in the linker. r=nfroyd

This commit is contained in:
Mike Hommey 2014-10-04 10:31:49 +09:00
parent 5331094bbb
commit 2466a02679

View File

@ -970,6 +970,12 @@ SEGVHandler::SEGVHandler()
: initialized(false), registeredHandler(false), signalHandlingBroken(true)
, signalHandlingSlow(true)
{
/* Ensure logging is initialized before the DEBUG_LOG in the test_handler.
* As this constructor runs before the ElfLoader constructor (by effect
* of ElfLoader inheriting from this class), this also initializes on behalf
* of ElfLoader and DebuggerHelper. */
Logging::Init();
/* Initialize oldStack.ss_flags to an invalid value when used to set
* an alternative stack, meaning we haven't got information about the
* original alternative stack and thus don't mean to restore it in