Skip to content

i#3538: Fix flakiness in static_maps_mixup_novars#7959

Merged
abhinav92003 merged 7 commits into
masterfrom
iX-fix-static-maps-mixup
Jun 24, 2026
Merged

i#3538: Fix flakiness in static_maps_mixup_novars#7959
abhinav92003 merged 7 commits into
masterfrom
iX-fix-static-maps-mixup

Conversation

@abhinav92003

@abhinav92003 abhinav92003 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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

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 abhinav92003 marked this pull request as draft June 19, 2026 21:41
@abhinav92003 abhinav92003 marked this pull request as ready for review June 22, 2026 02:02
Comment thread core/unix/os.c Outdated
@abhinav92003 abhinav92003 changed the title Fix flakiness in static_maps_mixup_novars i#3538: Fix flakiness in static_maps_mixup_novars Jun 22, 2026
Comment thread core/unix/os.c Outdated
Comment thread core/unix/memquery.c
Comment thread core/unix/memquery.c Outdated
Comment thread core/unix/os.c Outdated
Comment thread suite/tests/api/static_maps_mixup_novars.templatex
@abhinav92003 abhinav92003 merged commit b525480 into master Jun 24, 2026
23 checks passed
@abhinav92003 abhinav92003 deleted the iX-fix-static-maps-mixup branch June 24, 2026 19:50
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.

2 participants