Skip to content

ASan: Run with verify_asan_link_order=0. #3491

New issue

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

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

Already on GitHub? # to your account

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

Conversation

bernhardu
Copy link
Contributor

@bernhardu bernhardu commented Apr 11, 2023

Avoids error message:

  ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.

Affected tests:

  nested_detach_kill
  nested_detach_kill_stuck
  nested_detach_wait

(These tests may also need the ASan: Copy just used pages from ANONYMOUS|NORESERVE mappings. patch too.)

@Keno
Copy link
Member

Keno commented Apr 11, 2023

I feel like this conflates the issues of rr itself running under asan and rr tracing something running under asan (which itself may be rr). If it's just a matter of fixing the tests, I think this should be in __asan_default_options so it doesn't propagate to children.

@bernhardu
Copy link
Contributor Author

Thanks, let me try how it works when I put it into the default options.

@bernhardu

This comment was marked as outdated.

@bernhardu bernhardu force-pushed the cmake-option-asan-part2 branch from 4f90a93 to e07e77e Compare April 12, 2023 07:56
@bernhardu
Copy link
Contributor Author

I pushed a new version with no longer setting the environment, instead using __asan_default_options.

@bernhardu bernhardu force-pushed the cmake-option-asan-part2 branch from e07e77e to b4f7b0c Compare August 13, 2023 13:44
@bernhardu
Copy link
Contributor Author

Changes:

  • Rebased to current tip.
  • Do not try to add libasan to LD_PRELOAD below ASan-rr.

Avoids error message:
  ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.

Affected tests:
  nested_detach
  nested_detach_kill
  nested_detach_kill_stuck
  nested_detach_stop
  nested_detach_wait
@bernhardu bernhardu force-pushed the cmake-option-asan-part2 branch from b4f7b0c to 35e0f55 Compare September 10, 2023 13:55
@bernhardu
Copy link
Contributor Author

Just a rebase to current tip.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants