Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hppa-linux: broken integer support #394

Open
danglin44 opened this issue Sep 30, 2023 · 0 comments
Open

hppa-linux: broken integer support #394

danglin44 opened this issue Sep 30, 2023 · 0 comments
Labels
🐞Bug Stuff that doesn't work 🙏Help Wanted Good things to work on if you want to help out 🚉Platform Specific Stuff that happens on only one type of system

Comments

@danglin44
Copy link

The last version to successfully build on Debian hppa-linux was v0.94.

Commit aa05f0f exposed the following integer failures:

Test Summary Report

t/type_sint64.t (Wstat: 256 (exited 1) Tests: 3 Failed: 1)
Failed test: 3
Non-zero exit status: 1
t/type_uint64.t (Wstat: 256 (exited 1) Tests: 3 Failed: 1)
Failed test: 3
Non-zero exit status: 1
Files=63, Tests=311, 120 wallclock secs ( 1.31 usr 1.06 sys + 95.79 cusr 19.74 csys = 117.90 CPU)
Result: FAIL
Failed 2/63 test programs. 2/311 subtests failed.

    # Failed test at t/type_sint64.t line 127.
    # +--------------+----+-------+
    # | GOT          | OP | CHECK |
    # +--------------+----+-------+
    # | -90371962288 | eq | -22   |
    # +--------------+----+-------+
# Failed test 'argument'
# at t/type_sint64.t line 129.
    # Failed test at t/type_sint64.t line 135.
    # +--------------+----+-------+
    # | GOT          | OP | CHECK |
    # +--------------+----+-------+
    # | -90371962288 | eq | -22   |
    # +--------------+----+-------+
# Failed test 'return value'
# at t/type_sint64.t line 136.

(gdb) p/x (long long)-22
$2 = 0xffffffffffffffea
(gdb) p/x -90371962288
$3 = 0xffffffeaf5694a50

Argument and return value access alignment seem wrong.

Things got worse with commit 066068a. See build logs here:
https://buildd.debian.org/status/logs.php?pkg=libffi-platypus-perl&arch=hppa
The only successful builds didn't run the test suite.

The attached patch gets us back to the type_sint64.t and type_uint64.t fails.

hppa-fix.txt

hppa-linux is 32-bit big endian. The stack grows up. 64-bit ints are double word aligned.

@plicease plicease added 🐞Bug Stuff that doesn't work 🚉Platform Specific Stuff that happens on only one type of system 🙏Help Wanted Good things to work on if you want to help out labels Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞Bug Stuff that doesn't work 🙏Help Wanted Good things to work on if you want to help out 🚉Platform Specific Stuff that happens on only one type of system
Development

No branches or pull requests

2 participants