mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-17 03:12:21 +08:00
Do leak check before stopping network
This commit is contained in:
parent
96cc700440
commit
48c5ebf93b
@ -123,9 +123,18 @@ fdb_error_t fdb_run_network() {
|
||||
CATCH_AND_RETURN( API->runNetwork(); );
|
||||
}
|
||||
|
||||
#ifdef ADDRESS_SANITIZER
|
||||
extern "C" void __lsan_do_leak_check();
|
||||
#endif
|
||||
|
||||
extern "C" DLLEXPORT
|
||||
fdb_error_t fdb_stop_network() {
|
||||
CATCH_AND_RETURN( API->stopNetwork(); );
|
||||
#ifdef ADDRESS_SANITIZER
|
||||
// fdb_stop_network intentionally leaks a bunch of memory, so let's do the
|
||||
// leak check before that so it's meaningful
|
||||
__lsan_do_leak_check();
|
||||
#endif
|
||||
CATCH_AND_RETURN(API->stopNetwork(););
|
||||
}
|
||||
|
||||
extern "C" DLLEXPORT
|
||||
|
Loading…
x
Reference in New Issue
Block a user