Skip to content

branch-4.1: [fix](be ut) Skip custom memcpy on ARM+ASAN to fix segfault at process startup #63656#63942

Merged
yiguolei merged 1 commit into
branch-4.1from
auto-pick-63656-branch-4.1
Jun 1, 2026
Merged

branch-4.1: [fix](be ut) Skip custom memcpy on ARM+ASAN to fix segfault at process startup #63656#63942
yiguolei merged 1 commit into
branch-4.1from
auto-pick-63656-branch-4.1

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 1, 2026

Cherry-picked from #63656

…s startup (#63656)

The glibc-compatibility module provides a custom memcpy implementation
(memcpy_aarch64.cpp) that overrides the global memcpy symbol via extern
"C". This is done to avoid dependency on a specific glibc symbol version
(e.g., memcpy@@GLIBC_2.14) for portability.

However, libpthread's __pthread_initialize_minimal() calls memcpy during
very early process startup — before main(), before C++ static
initialization, and before ASAN shadow memory is set up. When ASAN is
enabled, the custom memcpy accesses memory that ASAN shadow has not yet
mapped, resulting in SIGSEGV.

This only affects aarch64 + ASAN because:

RELEASE builds have no ASAN shadow memory checks
x86_64 + ASAN does not exhibit this crash (different shadow memory
layout and initialization timing)

Co-authored-by: root <root@DESKTOP-3AF37B>
@github-actions github-actions Bot requested a review from yiguolei as a code owner June 1, 2026 06:45
@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@hello-stephen
Copy link
Copy Markdown
Contributor

run buildall

@yiguolei yiguolei merged commit ce53a3e into branch-4.1 Jun 1, 2026
28 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants