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

[common] Update ASan to be compatible with Clang 18 #1930

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

dimakuv
Copy link

@dimakuv dimakuv commented Jun 27, 2024

Description of the changes

Newer Clang versions added more ASan callbacks, in particular __asan_register_elf_globals() and __asan_unregister_elf_globals(). Our code replicates exactly what the Clang/LLVM code does for these two callbacks.

See:

Why these callbacks were added exactly, I am not sure. All I understand is that in some mode, on ELF-based platforms, these callbacks are called instead of a more generic __asan_register_globals(). See these links, maybe someone will get a better understanding of this change:

How to test this PR?

CI is enough for older ASan versions. To test newer ASan versions, run on Ubuntu 24.04 (and default Clang version there, which is v18).


This change is Reviewable

Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel)

a discussion (no related file):
Must be rebased on top of #1929. Blocking.


@dimakuv dimakuv force-pushed the dimakuv/asan-fix-clang-18 branch from d4900ec to ecb165e Compare June 27, 2024 13:41
mkow
mkow previously approved these changes Jul 1, 2024
Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (1 more required)

kailun-qin
kailun-qin previously approved these changes Jul 2, 2024
Copy link
Contributor

@kailun-qin kailun-qin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion

@dimakuv dimakuv force-pushed the dimakuv/ubsan-fix-clang-18 branch from f05ae1c to 78776a5 Compare July 22, 2024 17:10
Base automatically changed from dimakuv/ubsan-fix-clang-18 to master July 23, 2024 12:54
@dimakuv dimakuv dismissed stale reviews from kailun-qin and mkow July 23, 2024 12:54

The base branch was changed.

Newer Clang versions added more ASan callbacks, in particular
`__asan_register_elf_globals()` and `__asan_unregister_elf_globals()`.
Our code replicates exactly what the Clang/LLVM code does for these two
callbacks.

Signed-off-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@intel.com>
@dimakuv dimakuv force-pushed the dimakuv/asan-fix-clang-18 branch from ecb165e to f900466 Compare July 23, 2024 18:00
Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, all discussions resolved, not enough approvals from maintainers (1 more required), not enough approvals from different teams (1 more required, approved so far: Intel)

a discussion (no related file):

Previously, dimakuv (Dmitrii Kuvaiskii) wrote…

Must be rebased on top of #1929. Blocking.

Done


Copy link
Contributor

@kailun-qin kailun-qin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, all discussions resolved, not enough approvals from different teams (1 more required, approved so far: Intel)

Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@mkow mkow merged commit f900466 into master Jul 24, 2024
17 of 18 checks passed
@mkow mkow deleted the dimakuv/asan-fix-clang-18 branch July 24, 2024 00:37
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