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


##########
be/src/util/debug/leak_annotations.h:
##########
@@ -21,14 +21,14 @@
 // Does nothing if LeakSanitizer is not enabled.
 #define ANNOTATE_LEAKING_OBJECT_PTR(p)
 
-#if defined(__has_feature)
-#if __has_feature(address_sanitizer)
+#if (defined(__has_feature) &&                                               \

Review Comment:
   This combined `#if` is not portable to GCC. When `__has_feature` is 
undefined, GCC still has to parse the `__has_feature(address_sanitizer)` tokens 
in the expression and fails with `missing binary operator before token "("`; I 
reproduced it by preprocessing this header with `gcc -E`. Because 
`phdr_cache.cpp` now includes this header in normal Linux BE builds, GCC 
DEBUG/RELEASE/ASAN/LSAN builds fail before the Doris 
`ADDRESS_SANITIZER`/`LEAK_SANITIZER` checks are reached. This is distinct from 
the earlier GCC-sanitizer enablement thread: the current resolution now breaks 
preprocessing. Please keep the `__has_feature(...)` calls inside a nested `#if 
defined(__has_feature)` block, or define a local fallback macro before using 
them, and then combine that result with the Doris sanitizer defines.



-- 
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