diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-08-08 12:42:32 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-08-09 15:55:28 +0200 |
commit | 8313116f962ac87e103ea22aafb58700b8c695da (patch) | |
tree | 2feba13a5ab3030a98f4d4c147861874a967785d /cppuhelper | |
parent | 7cb07a7a7cb2b05be3f698daccf8bfaef427a728 (diff) |
Don't use internal __CxxDetectRethrow: it has side effects
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: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cppuhelper')
0 files changed, 0 insertions, 0 deletions