Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 883607 - sys-devel/binutils-2.39-r4: fails specific tests on all devboxes
Summary: sys-devel/binutils-2.39-r4: fails specific tests on all devboxes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL: https://sourceware.org/bugzilla/show_...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-29 17:28 UTC by Arthur Zamarin
Modified: 2023-08-03 20:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,719.54 KB, text/plain)
2022-11-29 17:28 UTC, Arthur Zamarin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2022-11-29 17:28:10 UTC
Created attachment 838079 [details]
build.log

Tested on all devboxes ({arm,ppc}{,64},sparc,hppa), on updated stable containers which are ran using systemd-nspawn.

I'm sorry that I'm unable to extract the relevant information from the test log, but it is attached to this bug.

If you don't care about those failures, please say so, and I will just stable it. It compiles fine and works for all other stuff in container.
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2022-12-02 20:58:35 UTC
Hi Arthur, could you please check in the build dir of one of the failed runs for the following files

tls-relax-gdesc-le-now.out
bti-plt-5.d.out  or  bti-plt-5.out

and attach them? TIA
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2022-12-02 21:51:56 UTC
(In reply to Andreas K. Hüttel from comment #1)
> Hi Arthur, could you please check in the build dir of one of the failed runs
> for the following files
> 
> tls-relax-gdesc-le-now.out
> bti-plt-5.d.out  or  bti-plt-5.out
> 
> and attach them? TIA

nevermind, I managed to reproduce it
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2022-12-02 21:52:57 UTC
/var/tmp/portage/sys-devel/binutils-2.39-r4/work/build/ld/../gas/as-new     -o tmpdir/tls-relax-gdesc-le.o /var/tmp/portage/sys-devel/binutils-2.39-r4/work/binutils-2.39/ld/testsuite/
ld-aarch64/tls-relax-gdesc-le.s
Executing on host: sh -c {/var/tmp/portage/sys-devel/binutils-2.39-r4/work/build/ld/../gas/as-new     -o tmpdir/tls-relax-gdesc-le.o /var/tmp/portage/sys-devel/binutils-2.39-r4/work/b
inutils-2.39/ld/testsuite/ld-aarch64/tls-relax-gdesc-le.s 2>&1}  /dev/null dump.tmp (timeout = 300)
spawn [open ...]
./ld-new --hash-style=sysv -z norelro  -L/var/tmp/portage/sys-devel/binutils-2.39-r4/work/binutils-2.39/ld/testsuite/ld-aarch64  -shared -z now -o tmpdir/dump tmpdir/tls-relax-gdesc-l
e.o 
Executing on host: sh -c {./ld-new --hash-style=sysv -z norelro  -L/var/tmp/portage/sys-devel/binutils-2.39-r4/work/binutils-2.39/ld/testsuite/ld-aarch64  -shared -z now -o tmpdir/dum
p tmpdir/tls-relax-gdesc-le.o  2>&1}  /dev/null dump.tmp (timeout = 300)
spawn [open ...]
/var/tmp/portage/sys-devel/binutils-2.39-r4/work/build/ld/../binutils/readelf  -dr tmpdir/dump > tmpdir/dump.out
Executing on host: sh -c {/var/tmp/portage/sys-devel/binutils-2.39-r4/work/build/ld/../binutils/readelf  -dr tmpdir/dump > tmpdir/dump.out 2>dump.tmp}  /dev/null  (timeout = 300)
spawn [open ...]
regexp_diff match failure
regexp "^ 0x.+ \(BIND_NOW\) \s+$"
line   " 0x000000000000001e (FLAGS)              BIND_NOW"
FAIL: ld-aarch64/tls-relax-gdesc-le-now
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2022-12-02 21:55:23 UTC
/var/tmp/portage/sys-devel/binutils-2.39-r4/work/build/ld/../gas/as-new  -mabi=lp64 -defsym __property_bti__=1  -o tmpdir/property-bti-pac1.o /var/tmp/portage/sys-devel/binutils-2.39-
r4/work/binutils-2.39/ld/testsuite/ld-aarch64/property-bti-pac1.s
Executing on host: sh -c {/var/tmp/portage/sys-devel/binutils-2.39-r4/work/build/ld/../gas/as-new  -mabi=lp64 -defsym __property_bti__=1  -o tmpdir/property-bti-pac1.o /var/tmp/portag
e/sys-devel/binutils-2.39-r4/work/binutils-2.39/ld/testsuite/ld-aarch64/property-bti-pac1.s 2>&1}  /dev/null dump.tmp (timeout = 300)
spawn [open ...]
./ld-new --hash-style=sysv -z norelro  -L/var/tmp/portage/sys-devel/binutils-2.39-r4/work/binutils-2.39/ld/testsuite/ld-aarch64  -e _start -L./tmpdir -lbti-plt-so -o tmpdir/dump tmpdi
r/property-bti-pac1.o 
Executing on host: sh -c {./ld-new --hash-style=sysv -z norelro  -L/var/tmp/portage/sys-devel/binutils-2.39-r4/work/binutils-2.39/ld/testsuite/ld-aarch64  -e _start -L./tmpdir -lbti-p
lt-so -o tmpdir/dump tmpdir/property-bti-pac1.o  2>&1}  /dev/null dump.tmp (timeout = 300)
spawn [open ...]
/var/tmp/portage/sys-devel/binutils-2.39-r4/work/build/ld/../binutils/objdump  -dr -j .plt tmpdir/dump > tmpdir/dump.out
Executing on host: sh -c {/var/tmp/portage/sys-devel/binutils-2.39-r4/work/build/ld/../binutils/objdump  -dr -j .plt tmpdir/dump > tmpdir/dump.out 2>dump.tmp}  /dev/null  (timeout = 3
00)
spawn [open ...]
regexp_diff match failure
regexp "^.*:    f9421611        ldr     x17, \[x16, #1064\]$"
line   "  40028c:       f941fe11        ldr     x17, [x16, #1016]"
regexp_diff match failure
regexp "^.*:    9110a210        add     x16, x16, #0x428$"
line   "  400290:       910fe210        add     x16, x16, #0x3f8"
regexp_diff match failure
regexp "^.*:    f9421a11        ldr     x17, \[x16, #1072\]$"
line   "  4002a8:       f9420211        ldr     x17, [x16, #1024]"
regexp_diff match failure
regexp "^.*:    9110c210        add     x16, x16, #0x430$"
line   "  4002ac:       91100210        add     x16, x16, #0x400"
FAIL: BTI PLT with only GNU PROP
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2022-12-09 21:34:05 UTC
> regexp_diff match failure
> regexp "^ 0x.+ \(BIND_NOW\) \s+$"
> line   " 0x000000000000001e (FLAGS)              BIND_NOW"
> FAIL: ld-aarch64/tls-relax-gdesc-le-now

This should be harmless (but why it causes a test failure is a mystery to me).

Basically marking something with DT_BIND_NOW (which the regexp checks for) is an older way, and nowadays binaries are marked with DF_BIND_NOW (which is the value that fails the regexp).
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2022-12-31 14:25:03 UTC
Running /var/tmp/portage/sys-devel/binutils-2.38-r2/work/binutils-2.38/ld/testsuite/ld-aarch64/aarch64-elf.exp ...
FAIL: ld-aarch64/tls-relax-gdesc-le-now
FAIL: BTI PLT with only GNU PROP
Running /var/tmp/portage/sys-devel/binutils-2.38-r2/work/binutils-2.38/ld/testsuite/ld-alpha/alpha.exp ...

^ Note: this now also fails in current stable, so it's not a regression. Does not block 2.39 stabilization.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-03 20:27:55 UTC
Fixed in 2.40.