github-actions[bot] commented on code in PR #64241:
URL: https://github.com/apache/doris/pull/64241#discussion_r3688674258


##########
be/src/util/debug/leak_annotations.h:
##########
@@ -77,12 +75,22 @@ void __lsan_do_leak_check();
 int __lsan_do_recoverable_leak_check();
 } // extern "C"
 
+#endif // DORIS_LSAN_ENABLED && __linux__

Review Comment:
   **[P2] Preserve LSan suppression on supported macOS builds**
   
   Moving this `#endif` here makes all copied LSan declarations Linux-only, and 
the new matching `__linux__` guards below also make `ScopedLSANDisabler` a 
no-op on Darwin. But `DORIS_LSAN_ENABLED` is true for Clang ASAN/LSAN there, 
LLVM 16 implements `__lsan_disable`/`__lsan_enable` on Darwin, and 
`BUILD_TYPE_UT=LSAN` is selectable. `load_stream_test.cpp` wraps 
`brpc::Server::Start` in `ScopedLeakCheckDisabler` so those allocations are not 
reported; standalone macOS LSan (or ASAN with `detect_leaks=1`) will now report 
them. Keep the declarations and RAII calls enabled on Darwin too, or gate them 
on actual LSan runtime support; only platform-specific annotation behavior 
needs a narrower guard.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to