• Mike Kaganski's avatar
    Don't use internal __CxxDetectRethrow: it has side effects · 8313116f
    Mike Kaganski yazdı
    Since the __CxxDetectRethrow may increment __ProcessingThrow, which then
    must be decremented in __CxxUnregisterExceptionObject, and the latter does
    many other funny things with exception handling CRT machinery, we cannot
    use those internal functions (neither alone, nor together), or we end up
    breaking runtime's expectations: the runtime code checks __ProcessingThrow
    left and right, expecting its non-0 value to indicate "we are unwinding...
    possibly called from a dtor()". In this case, e.g., std::current_exception
    returns nullptr inside catch block.
    This creates our own copy of __CxxDetectRethrow, which does not mangle the
    global state, and just performs the same checks. This is a dirty hack, and
    it relies on current layout of the exception description layout - so must
    be synchronized in the event of changes!
    Change-Id: I2c475fbc2468073b796c7e9d0f4dfcd315896489
    Reviewed-on: https://gerrit.libreoffice.org/58730
    Tested-by: Jenkins
    Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Son kayıt (commit)
Son güncelleme
cpp_uno Loading commit data...
jni_uno Loading commit data...