heguanhui opened a new pull request, #64164:
URL: https://github.com/apache/doris/pull/64164
### What problem does this PR solve?
Issue Number: close #64163
Related PR: #
Problem Summary: When building BE unit tests in LSAN+UBSAN mode, the linker
reports a duplicate symbol error for `__lsan_ignore_object`. The root cause is
that `phdr_cache.cpp` manually declares and defines `__lsan_ignore_object`,
which conflicts with the LSAN runtime library that already provides this
symbol. Additionally, `leak_annotations.h` only enables
`ANNOTATE_LEAKING_OBJECT_PTR` under `address_sanitizer` but not under
`leak_sanitizer` independently.
The fix:
1. Replace the manual `__lsan_ignore_object` declaration/definition in
`phdr_cache.cpp` with the existing `ANNOTATE_LEAKING_OBJECT_PTR` macro from
`leak_annotations.h`
2. Extend `leak_annotations.h` to also enable `ANNOTATE_LEAKING_OBJECT_PTR`
when `leak_sanitizer` is detected (not just `address_sanitizer`)
### Release note
None
### Check List (For Author)
- Test
- [x] Unit Test: BE UT runs successfully in LSAN+UBSAN mode after the
fix (8194 tests from 912 test suites)
- [ ] Regression test
- [ ] Manual test
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason
- Behavior changed:
- [x] No.
- [ ] Yes.
- Does this need documentation?
- [x] No.
- [ ] Yes.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]