cf. http://www.gnu.org/software/libc/manual/html_node/Nonreentrancy.html#Nonreentrancy When we have re-enterancy guards in our signal handlers - we should use the 'volatile' keyword eg. oslSignalAction SAL_CALL VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo* pInfo) { static bool bIn = false; // if we crash again, bail out immediately if ( !bIn ) should be static volatile bool bIn = false; =) It would be good to chase through the code a little bit in this regard as there are several signal handlers that (I suspect) do similar things - and sub-methods that assume similar things. Thanks !
Migrating Whiteboard tags to Keywords: (easyHack, difficultyBeginner, skillCpp, topicCleanup)
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC) [NinjaEdit]
Lets assume for the sake of argument that the other signal handlers have been reviewed & audited =)
Strictly speaking, variables used to communicate with signal handlers need to be precisely of type "std::sig_atomic_t volatile", not "<arbitrary type> volatile". And, without further synchronization, they only work within a single thread. But our signal handlers are operating on very thin ice anyway, as the behavior of anything beyond POF (see C++ Standard's [support.runtime]) is implementation-defined---which would include any synchronization to make such variables accessible across multiple threads.