i#3538: Fix flakiness in static_maps_mixup_novars#7959
Merged
Conversation
Adds a reentrancy guard to get_dynamo_library_bounds to prevent a scenario where the 'expected elf header' ASSERT in memquery_library_bounds fails, which triggers d_r_internal_error -> report_dynamorio_problem -> privload_print_modules -> get_dynamorio_dll_start -> get_dynamo_library_bounds. Improves the copy_and_remap logic which needs to break DR's heuristic for finding library bounds for the purpose of the test, in a way that keeps the yesvars version working. We simply add the writable bit to the first segment mapping. Also adjusts the expected failure message for the debug build, which actually fails at an ASSERT.
abhinav92003
commented
Jun 22, 2026
derekbruening
approved these changes
Jun 22, 2026
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.
The static_maps_mixup_novars is unable to create a fake issue in finding the DR library bounds on my local machine, and the execution just completes successfully, not generating the expected error message.
Improves the copy_and_remap logic in static_maps_mixup.c which needs to break DR's logic for finding library bounds for the purpose of the static_maps_mixup_novars test, in a way that keeps the static_maps_mixup_yesvars version still working. We simply add the writable bit to the first segment mapping to achieve this. With this there's a hang in debug build.
Adds a guard to get_dynamo_library_bounds to try getting the bounds only once and during init. This is to prevent a scenario where the 'expected elf header' ASSERT in memquery_library_bounds fails, which triggers d_r_internal_error -> report_dynamorio_problem -> privload_print_modules -> get_dynamorio_dll_start -> get_dynamo_library_bounds.
Ensures that a failure to find the ELF header is propagated properly in the release build.
Also adjusts the expected failure message for the debug build, which actually fails at an ASSERT.
Would be good to observe the test's flakiness over a few days before removing the "flaky" suffix.
Issue: #3538