Bug 2045797
Summary: | libffi: FTBFS in Fedora rawhide/f36 on ppc64le | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Fedora Release Engineering <releng> | ||||||||
Component: | libffi | Assignee: | Carlos O'Donell <codonell> | ||||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | unspecified | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | rawhide | CC: | codonell, dan, david.brown, dj, fweimer, green, jakub, lkundrak, mcermak, mhroncok, negativo17 | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | libffi-3.4.2-8.fc36 | Doc Type: | If docs needed, set a value | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2022-01-31 13:37:50 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 1071880, 1992484, 2046865 | ||||||||||
Attachments: |
|
Description
Fedora Release Engineering
2022-01-25 18:35:04 UTC
Created attachment 1855217 [details]
build.log
file build.log too big, will only attach last 32768 bytes
Created attachment 1855218 [details]
root.log
file root.log too big, will only attach last 32768 bytes
Created attachment 1855219 [details]
state.log
the IEEE long double change broke it if I see right this is the output for the failed tests: Executing on host: gcc ../../testsuite/libffi.closures/cls_align_longdouble_split.c -W -Wall -Wno-psabi -O0 -I/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/../ include -I../../testsuite/../include -I/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/../include/.. -L/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gn u/testsuite/../.libs -lffi -lm -o ./cls_align_longdouble_split.exe (timeout = 300) spawn -ignore SIGHUP gcc ../../testsuite/libffi.closures/cls_align_longdouble_split.c -W -Wall -Wno-psabi -O0 -I/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/../in clude -I../../testsuite/../include -I/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/../include/.. -L/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/t estsuite/../.libs -lffi -lm -o ./cls_align_longdouble_split.exe PASS: libffi.closures/cls_align_longdouble_split.c -W -Wall -Wno-psabi -O0 (test for excess errors) Setting LD_LIBRARY_PATH to .::/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/../.libs:.::/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/.. /.libs Execution timeout is: 300 spawn [open ...] 1 1 1 1 1 1 1 8 8 8 8 8 8 9: 9 9 9 9 9 9 10 res: 9 9 9 9 9 9 10 1 2 3 4 5 6 7 8 9 10 11 12 13 14: 9 11 13 15 17 19 21 res: 9 11 13 15 17 19 21 PASS: libffi.closures/cls_align_longdouble_split.c -W -Wall -Wno-psabi -O0 execution test FAIL: libffi.closures/cls_align_longdouble_split.c -W -Wall -Wno-psabi -O0 output pattern test Output was: 1 1 1 1 1 1 1 8 8 8 8 8 8 9: 9 9 9 9 9 9 10 res: 9 9 9 9 9 9 10 1 2 3 4 5 6 7 8 9 10 11 12 13 14: 9 11 13 15 17 19 21 res: 9 11 13 15 17 19 21 Should match: 1 2 3 4 5 6 7 8 9 10 11 12 13 14: 9 11 13 15 17 19 21^M? res: 9 11 13 15 17 19 21^M? 1 2 3 4 5 6 7 8 9 10 11 12 13 14: 9 11 13 15 17 19 21^M? res: 9 11 13 15 17 19 21 Executing on host: gcc ../../testsuite/libffi.closures/cls_align_longdouble_split.c -W -Wall -Wno-psabi -O2 -I/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/../include -I../../testsuite/../include -I/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/../include/.. -L/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/../.libs -lffi -lm -o ./cls_align_longdouble_split.exe (timeout = 300) spawn -ignore SIGHUP gcc ../../testsuite/libffi.closures/cls_align_longdouble_split.c -W -Wall -Wno-psabi -O2 -I/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/../include -I../../testsuite/../include -I/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/../include/.. -L/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/../.libs -lffi -lm -o ./cls_align_longdouble_split.exe PASS: libffi.closures/cls_align_longdouble_split.c -W -Wall -Wno-psabi -O2 (test for excess errors) Setting LD_LIBRARY_PATH to .::/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/../.libs:.::/home/sharkcz/libffi/libffi-3.4.2/powerpc64le-redhat-linux-gnu/testsuite/../.libs Execution timeout is: 300 spawn [open ...] 1 1 1 1 1 1 1 8 8 8 8 8 8 9: 9 9 9 9 9 9 10 res: 9 9 9 9 9 9 10 1 2 3 4 5 6 7 8 9 10 11 12 13 14: 9 11 13 15 17 19 21 res: 9 11 13 15 17 19 21 PASS: libffi.closures/cls_align_longdouble_split.c -W -Wall -Wno-psabi -O2 execution test FAIL: libffi.closures/cls_align_longdouble_split.c -W -Wall -Wno-psabi -O2 output pattern test Output was: 1 1 1 1 1 1 1 8 8 8 8 8 8 9: 9 9 9 9 9 9 10 res: 9 9 9 9 9 9 10 1 2 3 4 5 6 7 8 9 10 11 12 13 14: 9 11 13 15 17 19 21 res: 9 11 13 15 17 19 21 Should match: 1 2 3 4 5 6 7 8 9 10 11 12 13 14: 9 11 13 15 17 19 21^M? res: 9 11 13 15 17 19 21^M? 1 2 3 4 5 6 7 8 9 10 11 12 13 14: 9 11 13 15 17 19 21^M? res: 9 11 13 15 17 19 21 When running the cls_align_longdouble_split test case under gdb, it looks to me like it would be rather miscompiled than anything else ... After further investigation it looks to me that handling of homogeneous structs in ffi_prep_args64() is wrong, around https://github.com/libffi/libffi/blob/master/src/powerpc/ffi_linux64.c#L663 It corresponds to the test results, the only difference between the cls_align_longdouble_split and cls_align_longdouble_split2 tests is that the second uses a non-homogeneous struct (long doubles + double), while the first is all long doubles. I think I got it, it was copying always only the first member into the vector register space diff -up libffi-3.4.2/src/powerpc/ffi_linux64.c.orig libffi-3.4.2/src/powerpc/ffi_linux64.c --- libffi-3.4.2/src/powerpc/ffi_linux64.c.orig 2022-01-28 22:48:02.196808564 +0000 +++ libffi-3.4.2/src/powerpc/ffi_linux64.c 2022-01-28 22:48:07.076869642 +0000 @@ -680,7 +680,7 @@ ffi_prep_args64 (extended_cif *ecif, uns { if (vecarg_count < NUM_VEC_ARG_REGISTERS64 && i < nfixedargs) - memcpy (vec_base.f128++, arg.f128, sizeof (float128)); + memcpy (vec_base.f128++, arg.f128++, sizeof (float128)); else memcpy (next_arg.f128, arg.f128++, sizeof (float128)); if (++next_arg.f128 == gpr_end.f128) fix proposed in https://github.com/libffi/libffi/pull/689 opened a PR in https://src.fedoraproject.org/rpms/libffi/pull-request/6 |