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

riscv64-shared-abs-sym fails with 2.31.0 #1254

Open
okias opened this issue May 7, 2024 · 2 comments
Open

riscv64-shared-abs-sym fails with 2.31.0 #1254

okias opened this issue May 7, 2024 · 2 comments

Comments

@okias
Copy link

okias commented May 7, 2024

one more riscv64 failure in 2.31.0, see https://gitlab.alpinelinux.org/alpine/aports/-/jobs/1377073

Log:

210/332 Test #211: riscv64-shared-abs-sym ......................***Failed    0.54 sec
++ dirname /builds/alpine/aports/community/mold/src/mold-2.31.0/test/elf/shared-abs-sym.sh
+ . /builds/alpine/aports/community/mold/src/mold-2.31.0/test/elf/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z riscv64 ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/elf/riscv64
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
++ '[' riscv64 = x86_64 -o riscv64 = i686 -o riscv64 = arm ']'
++ '[' riscv64 = aarch64 ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
+++ basename /builds/alpine/aports/community/mold/src/mold-2.31.0/test/elf/shared-abs-sym.sh .sh
++ testname=shared-abs-sym
++ echo -n 'Testing shared-abs-sym ... '
Testing shared-abs-sym ... ++ t=out/test/elf/riscv64/shared-abs-sym
++ mkdir -p out/test/elf/riscv64/shared-abs-sym
+ cat
+ cc -B. -fPIC -shared -o out/test/elf/riscv64/shared-abs-sym/a.so -xassembler -
+ cat
+ cc -B. -fPIC -shared -o out/test/elf/riscv64/shared-abs-sym/b.so -xassembler -
+ cc -fPIC -c -o out/test/elf/riscv64/shared-abs-sym/c.o -xc -
+ cat
+ cc -B. -o out/test/elf/riscv64/shared-abs-sym/exe1 -pie out/test/elf/riscv64/shared-abs-sym/c.o out/test/elf/riscv64/shared-abs-sym/a.so
+ out/test/elf/riscv64/shared-abs-sym/exe1
+ grep -q foo=0x3
+ LD_PRELOAD=out/test/elf/riscv64/shared-abs-sym/b.so
+ out/test/elf/riscv64/shared-abs-sym/exe1
+ grep -q foo=0x5
++ on_error 23
++ code=1
++ echo 'command failed: 23: grep -q '\''foo=0x5'\'''
command failed: 23: grep -q 'foo=0x5'
++ trap - EXIT
++ exit 1
@okias okias changed the title riscv64-shared-abs-sym riscv64-shared-abs-sym fails with 2.31.0 May 7, 2024
@rui314
Copy link
Owner

rui314 commented May 8, 2024

How do I reproduce the failure? I tried with alpine:edge docker image with --platform riscv64, but the test didn't fail.

@bl4ckb0ne
Copy link
Contributor

I tried to reproduce on my end with podman and --arch riscv64 and I get a riscv64-section-order crashes consistantly with both master and v2.31.0. riscv64-shared-abs-sym didnt fail as well.

215/339 Test #215: riscv64-section-order .......................***Failed    0.69 sec
++ dirname /tmp/mold/test/elf/section-order.sh
+ . /tmp/mold/test/elf/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z riscv64 ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/elf/riscv64
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
++ '[' riscv64 = x86_64 -o riscv64 = i686 -o riscv64 = arm ']'
++ '[' riscv64 = aarch64 ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
+++ basename /tmp/mold/test/elf/section-order.sh .sh
++ testname=section-order
++ echo -n 'Testing section-order ... '
Testing section-order ... ++ t=out/test/elf/riscv64/section-order
++ mkdir -p out/test/elf/riscv64/section-order
+ on_qemu
+ '[' '' '!=' '' ']'
+ grep -qw qemu /proc/cpuinfo
+ cat
+ cc -o out/test/elf/riscv64/section-order/a.o -c -xc -fno-PIC -
+ cc -B. -o out/test/elf/riscv64/section-order/exe1 out/test/elf/riscv64/section-order/a.o -no-pie '-Wl,--section-order==0x100000 PHDR =0x200000 .fn2 TEXT =0x300000 .fn1 DATA BSS RODATA'
+ out/test/elf/riscv64/section-order/exe1
+ grep -q Hello
++ on_error 20
++ code=1
++ echo 'command failed: 20: grep -q Hello'
command failed: 20: grep -q Hello
++ trap - EXIT
++ exit 1

The alpine riscv64 runs on real hardware (scaleway and milkv pioneer),

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

No branches or pull requests

3 participants