i386 testsuite fixes: correct get_pointer, restrict 64-bit-op tests - #274
Open
bbiiggppiigg wants to merge 1 commit into
Open
i386 testsuite fixes: correct get_pointer, restrict 64-bit-op tests#274bbiiggppiigg wants to merge 1 commit into
bbiiggppiigg wants to merge 1 commit into
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
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).