i386 testsuite fixes: correct get_pointer, restrict 64-bit-op tests - #274
Merged
Merged
Conversation
…p tests
The test1 suite runs a 64-bit mutator against 32-bit mutatees (there is no
32-bit mutator; BUILD_RTLIB_32). Two independent problems prevented it from
producing a correct i386 baseline.
- get_pointer() in test1.h built its sentinel value high-byte-first
((val << 8) | byte). The 64-bit mutator and the 32-bit mutatee evaluate
this at different widths, so a pointer-sized constant crossing the boundary
is truncated to 32 bits and the two sides' low 32 bits disagree (mutator
0xa4a5a6a7 vs mutatee 0xa0a1a2a3). test1_2 -- and any test comparing a
get_pointer() value across mutator and mutatee -- then failed on i386.
Build the value low-byte-first so its low bytes are width-independent.
- test1_5 and test1_6 exercise 64-bit integer operations (long long
compares, multiply/divide with results exceeding 2^32) inside
instrumentation snippets. The i386 snippet register model is 32-bit and
cannot represent those operands, so the tests cannot pass under the 32-bit
ABI regardless of Dyninst correctness. Mark them restricted_amd64_abi so
they run only under the 64-bit ABI, and update the generated
test_info_new.gen.C to match (dropping their abi:32 entries).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bbiiggppiigg
marked this pull request as draft
July 24, 2026 04:16
bbiiggppiigg
marked this pull request as ready for review
July 24, 2026 21:31
Contributor
|
@bbiiggppiigg I completely forgot about this. Is it still an issue? |
Member
Author
I believe so, I can check. |
hainest
approved these changes
Sep 22, 2026
hainest
left a comment
Contributor
There was a problem hiding this comment.
No regressions on 15 machines (a couple of the UO machines are down).
For the two x86 machines with 32-bit libraries, I see
omnia@UO (no static glibc)
32-bit tests: 316 PASSED, 16 FAILED, 0 CRASHED/HANGED
64-bit tests: 722 PASSED, 0 FAILED, 0 CRASHED/HANGED
test_pt_ls none 64 attach NA dynamic nonPIC SKIPPED
Ran 1347 tests.
coriander
32-bit tests: 705 PASSED, 52 FAILED, 0 CRASHED/HANGED
64-bit tests: 1167 PASSED, 0 FAILED, 0 CRASHED/HANGED
test_pt_ls none 64 attach NA dynamic nonPIC SKIPPED
Ran 2237 tests.
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 test1 suite runs a 64-bit mutator against 32-bit mutatees (there is no 32-bit mutator; BUILD_RTLIB_32). Two independent problems prevented it from producing a correct i386 baseline.
get_pointer() in test1.h built its sentinel value high-byte-first ((val << 8) | byte). The 64-bit mutator and the 32-bit mutatee evaluate this at different widths, so a pointer-sized constant crossing the boundary is truncated to 32 bits and the two sides' low 32 bits disagree (mutator 0xa4a5a6a7 vs mutatee 0xa0a1a2a3). test1_2 -- and any test comparing a get_pointer() value across mutator and mutatee -- then failed on i386. Build the value low-byte-first so its low bytes are width-independent.
test1_5 and test1_6 exercise 64-bit integer operations (long long compares, multiply/divide with results exceeding 2^32) inside instrumentation snippets. The i386 snippet register model is 32-bit and cannot represent those operands, so the tests cannot pass under the 32-bit ABI regardless of Dyninst correctness. Mark them restricted_amd64_abi so they run only under the 64-bit ABI, and update the generated test_info_new.gen.C to match (dropping their abi:32 entries).