[Bug libc/33911] New: SIGSEGV of --static-pie binaries on riscv64
simon.poirier at canonical dot com
sourceware-bugzilla@sourceware.org
Wed Feb 18 23:53:29 GMT 2026
https://sourceware.org/bugzilla/show_bug.cgi?id=33911
Bug ID: 33911
Summary: SIGSEGV of --static-pie binaries on riscv64
Product: glibc
Version: 2.43
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: simon.poirier at canonical dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Building glibc 2.43,
on Ubuntu 26.04 (devel) images,
on a riscv64 qemu VM,
It appears like there is a regression with the generated code for binaries
linked with -static-pie. Specifically they seem to crash on
_dl_relocate_static_pie(). It's not entirely clear to me yet whether this is a
compiler issue, a riscv64 baseline incompatibility, a system issue, or a new
bug
in rcrt1
Reproducing:
# env setup
wget
https://cloud-images.ubuntu.com/resolute/current/resolute-server-cloudimg-riscv64.img
;
qemu-img resize resolute-server-cloudimg-riscv64.img +30G ;
touch meta-data
echo -e "#cloud-config\npassword: passw0rd\nchpasswd: { expire: False
}\nssh_pwauth: True\ncreate_hostname_file: true\n" > user-data ;
genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data ;
qemu-system-riscv64 -netdev user,id=n0 -device virtio-net,netdev=n0 \
-m 16G -smp 8 -drive file=resolute-server-cloudimg-riscv64.img \
-cdrom seed.iso -machine virt \
-kernel /usr/lib/u-boot/qemu-riscv64_smode/u-boot.bin \
-cpu max -nographic ;
# user ubuntu/passw0rd
ubuntu@ubuntu:~$ cat /etc/cloud/build.info
build_name: server
serial: 20260216
# build
sudo apt update ;
sudo apt install -y gcc make bison autoconf debhelper gettext libaudit-dev \
libgd-dev po-debconf rdfind systemtap-sdt-dev binutils-for-host g++-for-host \
gperf libcap-dev libselinux-dev quilt symlinks ;
wget https://ftp.gnu.org/gnu/libc/glibc-2.43.tar.xz ;
tar xvf glibc-2.43.tar.xz ;
mkdir build ; cd build ;
../glibc-2.43/configure --prefix=/usr ;
make -j 8 ;
./elf/ldconfig --help ;
Segmentation fault (core dumped) ./elf/ldconfig --help
Additional info:
Building any code with gcc -static-pie fails like ldconfig.
Compiler info:
# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/riscv64-linux-gnu/15/lto-wrapper
Target: riscv64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
15.2.0-12ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-15/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust,cobol,algol68
--prefix=/usr --with-gcc-major-version-only --program-suffix=-15
--program-prefix=riscv64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
--enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-libquadmath
--disable-libquadmath-support --enable-plugin --enable-default-pie
--with-system-zlib --enable-libphobos-checking=release
--with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch
--disable-werror --disable-multilib --with-abi=lp64d
--with-arch=rv64i_m_a_f_d_c_b_v_zic64b_zicbom_zicbop_zicboz_ziccamoa_ziccif_zicclsm_ziccrse_zicntr_zicond_zicsr_zifencei_zihintntl_zihintpause_zihpm_zimop_zmmul_za64rs_zaamo_zalrsc_zawrs_zfa_zfhmin_zca_zcb_zcd_zcmop_zba_zbb_zbs_zkt_zvbb_zve32f_zve32x_zve64d_zve64f_zve64x_zvfhmin_zvkb_zvkt_zvl128b_zvl32b_zvl64b_supm
--enable-checking=release --build=riscv64-linux-gnu --host=riscv64-linux-gnu
--target=riscv64-linux-gnu --with-build-config=bootstrap-lto-lean
--enable-link-serialization=4
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.2.0 (Ubuntu 15.2.0-12ubuntu1)
Ubuntu tracking bug:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/2142067
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list