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**
   
   `DORIS_LSAN_ENABLED` is true for Clang ASAN/LSAN on Darwin, and LLVM 16 
implements `__lsan_disable`/`__lsan_enable` on Darwin. `BUILD_TYPE_UT=LSAN` is 
selectable, and `load_stream_test.cpp` wraps `brpc::Server::Start` in 
`ScopedLeakCheckDisabler` so those allocations are not reported. With this 
`__linux__` guard the scope becomes a silent no-op on macOS, so standalone LSan 
(or ASAN with `detect_leaks=1`) will report the intentionally excluded 
allocations. 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