Skip to content

[DeviceSanitizer] When link with libc++, link the gcc_s first. #2478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

yingcong-wu
Copy link
Contributor

@yingcong-wu yingcong-wu commented Dec 18, 2024

When trying to static link the libc++, some namespace-less/common symbols got resolved to libc++/libc++abi/libunwind first before it got a chance to resolve to libstdc++ and related libs. This causes a stdlib mismatch problem and leads to one device sanitizer test(options-invalid-values.cpp) SEGV when trying to throw an exception.
By putting gcc_s first, we can prevent such a problem.

intel/llvm PR: intel/llvm#16525

@yingcong-wu yingcong-wu requested a review from a team as a code owner December 18, 2024 10:17
@yingcong-wu yingcong-wu requested review from zhaomaosu, AllanZyne and jinge90 and removed request for a team December 18, 2024 10:17
@github-actions github-actions bot added the loader Loader related feature/bug label Dec 18, 2024
@yingcong-wu yingcong-wu marked this pull request as draft December 19, 2024 02:32
@yingcong-wu yingcong-wu marked this pull request as ready for review December 19, 2024 03:24
@yingcong-wu yingcong-wu marked this pull request as draft December 19, 2024 03:25
@yingcong-wu yingcong-wu marked this pull request as ready for review December 19, 2024 03:25
@yingcong-wu yingcong-wu requested review from a team and AllanZyne December 19, 2024 03:25
@yingcong-wu
Copy link
Contributor Author

yingcong-wu commented Jan 2, 2025

Hi @unified-runtime-maintain, please help review this PR.
And please help tag this PR as it is targeted for 0.11.
Thank you!

@yingcong-wu
Copy link
Contributor Author

A more proper way to eliminate this problem is to build a standalone dynamic lib for the symbolizer. I am working on that.

@kbenzie kbenzie added the v0.11.x Include in the v0.11.x release label Jan 6, 2025
@kbenzie kbenzie merged commit 46bbad2 into oneapi-src:main Jan 6, 2025
73 checks passed
@kbenzie
Copy link
Contributor

kbenzie commented Jan 6, 2025

Changes pulled in by intel/llvm#16478.

kbenzie added a commit that referenced this pull request Jan 7, 2025
[DeviceSanitizer] When link with libc++, link the gcc_s first.
kbenzie added a commit that referenced this pull request Jan 7, 2025
[DeviceSanitizer] When link with libc++, link the gcc_s first.
kbenzie added a commit that referenced this pull request Jan 8, 2025
[DeviceSanitizer] When link with libc++, link the gcc_s first.
kbenzie added a commit that referenced this pull request Jan 8, 2025
[DeviceSanitizer] When link with libc++, link the gcc_s first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
loader Loader related feature/bug v0.11.x Include in the v0.11.x release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants