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] Dart AOT runtime should refuse to run snapshots with incompatible sanitizers #55637

Closed
dcharkes opened this issue May 3, 2024 · 2 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P3 A lower priority bug or feature request vm-technical-debt This label tries to capture all the technical debt that we have accumulated in the Dart VM

Comments

@dcharkes
Copy link
Contributor

dcharkes commented May 3, 2024

We should make the Dart precompiled runtime refuse to run AOT snapshots that are not built with the same sanitizers.

Our machine code generation emits different machine code if sanitizers are enabled. If the build is somehow misconfigured, it could happen that an AOT snapshot without the extra runtime-calls for unpoisoning, leading to sanitizers complaining.

(Such check would have saved me half a day of debugging. 🙃 )

@dcharkes dcharkes added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P3 A lower priority bug or feature request vm-technical-debt This label tries to capture all the technical debt that we have accumulated in the Dart VM labels May 3, 2024
@dcharkes
Copy link
Contributor Author

dcharkes commented May 3, 2024

@sstrickl Might you know what would be the best place to put some bits in an Elf and assembly snapshot that we can read out in the aot runtime?

@rmacnak-google
Copy link
Contributor

Dart::FeaturesString is where we check a bunch of runtime/snapshot compatibility things like mode and architecture. It already has something for TSAN, but not MSAN.

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, and the AOT and JIT backends. P3 A lower priority bug or feature request vm-technical-debt This label tries to capture all the technical debt that we have accumulated in the Dart VM
Projects
None yet
Development

No branches or pull requests

2 participants