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

[vm] gen_snapshot without santizers should be able to create AOT snapshots to be used with AOT runtimes with sanitizers #55638

Closed
dcharkes opened this issue May 3, 2024 · 1 comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. customer-google3 P2 A bug or feature request we're likely to work on

Comments

@dcharkes
Copy link
Contributor

dcharkes commented May 3, 2024

We have a bunch of #if defined(USING_MEMORY_SANITIZER) in our IL generation code. This means that if we want to build an AOT snapshot with the right runtime calls, the gen_snapshot must be built with sanitizers.

(I don't see any different machine code generation for ASAN, LSAN, UBSAN, or TSAN at the moment.)

@mraleph suggested it would be cleaner to be able to pass flags to gen_snapshot, so that a non-instrumented gen_snapshot can be used to build an instrumented aot snapshot.

Most likely, we can make these flags, and have the default value of the flag be based on the existing macros, so that current workflows relying on gen_snapshot being built with the sanitizer enabled keep working.

Related:

@dcharkes dcharkes added area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. P2 A bug or feature request we're likely to work on customer-google3 labels May 3, 2024
@dcharkes
Copy link
Contributor Author

dcharkes commented May 3, 2024

Relevant CL for TSAN: https://dart-review.googlesource.com/c/sdk/+/312480

@mkustermann Do you remember why we went for a target define instead of a flag? Should we do the same for MSAN? Or should we convert the TARGET_USES_THREAD_SANITIZER to a gen_snapshot flag?

copybara-service bot pushed a commit that referenced this issue May 8, 2024
…snapshot.

Add check that the snapshot and runtime agree on whether to use MSAN. We already have this check for TSAN.

TEST=vm/dart/sanitizer_compatibility_test
Bug: #55637
Bug: #55638
Change-Id: I320e6f55cd59209ce6e58a82ac205a87c8a60a84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365487
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. customer-google3 P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

2 participants