[libc++abi] Don't leak in test (#119505)
Trying to re-enable a test on bots
bb695735db/zorg/buildbot/builders/sanitizers/buildbot_functions.sh (L443)
When we reach `terminate()` `exc` pointer is not
on the stack, so lsan correctly reports a leak.
This commit is contained in:
parent
acaa5fac49
commit
a4538cdcee
1 changed files with 2 additions and 4 deletions
|
|
@ -44,10 +44,8 @@ struct Stop<R (*)(Args...)> {
|
|||
};
|
||||
|
||||
static void forced_unwind() {
|
||||
_Unwind_Exception* exc = new _Unwind_Exception;
|
||||
memset(&exc->exception_class, 0, sizeof(exc->exception_class));
|
||||
exc->exception_cleanup = 0;
|
||||
_Unwind_ForcedUnwind(exc, Stop<_Unwind_Stop_Fn>::stop, 0);
|
||||
static _Unwind_Exception exc = {};
|
||||
_Unwind_ForcedUnwind(&exc, Stop<_Unwind_Stop_Fn>::stop, 0);
|
||||
abort();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue