github-actions[bot] commented on code in PR #63656:
URL: https://github.com/apache/doris/pull/63656#discussion_r3306154083
##########
be/src/glibc-compatibility/CMakeLists.txt:
##########
@@ -59,7 +59,16 @@ if (GLIBC_COMPATIBILITY)
list(REMOVE_ITEM glibc_compatibility_sources musl/getrandom.c)
# NOTE(amos): sanitizers might generate memcpy references that are too
late to
# refer. Let's also extract memcpy definitions explicitly to avoid UNDEF
GLIBC 2.14.
- add_library(glibc-compatibility-explicit OBJECT musl/getrandom.c
${MEMCPY_SOURCE})
+ #
+ # NOTE: On ARM (aarch64) with ASAN, the custom memcpy (memcpy_aarch64.cpp)
overrides
+ # the global memcpy symbol. libpthread's __pthread_initialize_minimal()
calls memcpy
+ # before ASAN shadow memory is initialized, causing SIGSEGV. Skip custom
memcpy in
+ # this case and fall back to glibc's memcpy.
+ if (ARCH_ARM AND "${CMAKE_BUILD_TYPE}" STREQUAL "ASAN")
Review Comment:
This misses the BE unit-test build mode. `run-be-ut.sh` defaults
`BUILD_TYPE_UT` to `ASAN`, but before invoking CMake it maps that to
`-DCMAKE_BUILD_TYPE=ASAN_UT` (lines 245-254). On ARM BE UTs, this condition is
therefore false and `memcpy_aarch64.cpp` is still added to
`glibc-compatibility-explicit`, leaving the startup crash described in the PR
title unfixed. Please include `ASAN_UT` (or otherwise key off the sanitizer
flags) in this 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]