Match C GLOBAL_CODE repro assertions to failing Rust behavior#1
Open
zacharywhitley wants to merge 6 commits into
Open
Match C GLOBAL_CODE repro assertions to failing Rust behavior#1zacharywhitley wants to merge 6 commits into
zacharywhitley wants to merge 6 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
crates/c-api/tests/global_code.chelpers to obtain a module image start viawasmtime_module_image_rangeand to check/proc/self/mapsfor mapped/unmapped addresses.assert_mappedand post-dropassert_unmappedchecks around module lifetime in all repro paths, and recordedmodule_startfor delayed-drop cases.crates/c-api/tests/CMakeLists.txtto build and registertest-global-code, and wrapped gtest setup behind theWASMTIME_CAPI_ENABLE_GTEST_TESTSoption.Testing
cmake -S crates/c-api -B target/c-api-build-offline -DBUILD_TESTS=ON -DWASMTIME_CAPI_ENABLE_GTEST_TESTS=OFF && cmake --build target/c-api-build-offline --target test-global-code -j4, which completed successfully.ctest --test-dir target/c-api-build-offline -R test-global-code --output-on-failure, which reproduced the failing behavior (test run failed withthreaded post-drop: expected unmapped address ...).Codex Task