Skip to content
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

Use -fsanitize=address instead of -lasan for ASAN linker flags #3344

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

saiarcot895
Copy link
Contributor

@saiarcot895 saiarcot895 commented Oct 29, 2024

What I did

For the ASAN linker flags, use -fsanitize=address instead of manually specifying -lasan.

Why I did it

This allows the compiler to use some other linkages instead of -lasan in case that's not the correct one for the platform. It (should) also make sure that the ASAN library is the first library that gets linked and loaded at runtime.

This should also fix a flaky issue with the p4orch tests failing to run because ASAN isn't loaded first (not sure why this is flaky though, it should be pretty consistent).

How I verified it

Details if related

This allows the compiler to use some other linkages instead of -lasan in
case that's not the correct one for the platform. It (should) also make
sure that the ASAN library is the first library that gets linked and
loaded at runtime.

Signed-off-by: Saikrishna Arcot <[email protected]>
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.

1 participant