Skip to content

i386 testsuite fixes: correct get_pointer, restrict 64-bit-op tests - #274

Merged
bbiiggppiigg merged 1 commit into
masterfrom
bbiiggppiigg/i386-testsuite
Sep 22, 2026
Merged

bbiiggppiigg merged 1 commit into
masterfrom
bbiiggppiigg/i386-testsuite

Conversation

@bbiiggppiigg

@bbiiggppiigg bbiiggppiigg commented Jul 24, 2026

Copy link
Copy Markdown
Member

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).

…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 bbiiggppiigg changed the title i386 (32-bit) testsuite fixes: correct get_pointer, restrict 64-bit-o… i386 testsuite fixes: correct get_pointer, restrict 64-bit-op tests Jul 24, 2026
@bbiiggppiigg
bbiiggppiigg marked this pull request as draft July 24, 2026 04:16
@bbiiggppiigg
bbiiggppiigg marked this pull request as ready for review July 24, 2026 21:31
@hainest

hainest commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

@bbiiggppiigg I completely forgot about this. Is it still an issue?

@bbiiggppiigg

Copy link
Copy Markdown
Member Author

@bbiiggppiigg I completely forgot about this. Is it still an issue?

I believe so, I can check.

@hainest hainest left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bbiiggppiigg
bbiiggppiigg merged commit c694a8f into master Sep 22, 2026
1 check passed
@bbiiggppiigg
bbiiggppiigg deleted the bbiiggppiigg/i386-testsuite branch September 22, 2026 21:10
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