diff -r 55a0a1279a7e -r 206a6eaaeb71 kernel/eka/compsupp/symaehabi/callfirstprocessfn.cpp --- a/kernel/eka/compsupp/symaehabi/callfirstprocessfn.cpp Wed Oct 13 13:34:03 2010 +0100 +++ b/kernel/eka/compsupp/symaehabi/callfirstprocessfn.cpp Mon Oct 18 15:31:10 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of the License "ARM EABI LICENCE.txt" @@ -39,14 +39,18 @@ { TCppRTExceptionsGlobals aExceptionGlobals; + #if ENABLE_2ND_EMERGENCY_BUFFER + aExceptionGlobals.Init2ndEmergencyBuffer(); + #endif + if (!aNotFirst) { // Init statics for implicitly linked DLLs User::InitProcess(); - // Init statics for EXE //pick up export table if we're an exexp __DLL_Export_Table__(); + // Init statics for EXE __cpp_initialize__aeabi_(); } #ifdef __LEAVE_EQUALS_THROW__ @@ -54,9 +58,15 @@ try { r = aNotFirst ? (*aFn)(aPtr) : E32Main(); + #if ENABLE_2ND_EMERGENCY_BUFFER + aExceptionGlobals.Kill2ndEmergencyBuffer(); + #endif } catch (XLeaveException&) { + #if ENABLE_2ND_EMERGENCY_BUFFER + aExceptionGlobals.Kill2ndEmergencyBuffer(); + #endif User::Panic(KLitUser, EUserLeaveWithoutTrap); }