View Issue Details

IDProjectCategoryView StatusLast Update
0009637Rocky-Linux-10zlib-ngpublic2025-06-16 18:31
ReporterOlof Johansson Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status newResolutionopen 
Summary0009637: zlib-ng segfaults on riscv64 with RVV (upstream fix exists)
DescriptionI noticed that when booting and running on a riscv64 platform that has vector extensions (RVV), I get a crash in zlib-ng. Looking at the upstream sources, this has been fixed so this should just be a matter of backporting the change:

https://github.com/zlib-ng/zlib-ng/commit/2bba7e8468e808b7a7d5c1045d339eb5ffd12591


Steps To ReproduceBoot on a risc-v system with RVV implemented (either qemu with `-mcpu=tt-ascalon` or real hardware such as a Tenstorrent Blackhole card).

Boot, login. I was able to trigger this when running `mandb` since it (presumably) processes some compressed files that trigger this path.
Additional InformationI captured a coredump and it's pointing at the same function as the upstream commit is fixing:

(gdb) where
#0 0x00007fffa5bc9f86 in memcpy (__dest=0x55555f3eeb78, __src=0x55555f55ad6a, __len=18446744073708060160) at /usr/include/bits/string_fortified.h:29
#1 chunkcopy_rvv (
    out=0x55555f3eeb78 "warning options also\nhas a negative form beginning \\fB\\-Wno\\-\\fR to turn off warnings; for\nexample, \\fB\\-Wno\\-implicit\\fR. This manual lists only one of the\ntwo forms, whichever is not the default. "...,
    from=0x55555f55ad6a "warning options also\nhas a negative form beginning \\fB\\-Wno\\-\\fR to turn off warnings; for\nexample, \\fB\\-Wno\\-implicit\\fR. This manual lists only one of the\ntwo forms, whichever is not the default. "...,
    len=0) at /usr/src/debug/zlib-ng-2.2.3-1.el10.riscv64/arch/riscv/chunkset_rvv.c:103
#2 chunkmemset_rvv (
    out=0x55555f3eeb6f "specific warning options also\nhas a negative form beginning \\fB\\-Wno\\-\\fR to turn off warnings; for\nexample, \\fB\\-Wno\\-implicit\\fR. This manual lists only one of the\ntwo forms, whichever is not the d"...,
    from=0x55555f55ad61 "specific warning options also\nhas a negative form beginning \\fB\\-Wno\\-\\fR to turn off warnings; for\nexample, \\fB\\-Wno\\-implicit\\fR. This manual lists only one of the\ntwo forms, whichever is not the d"...,
    len=9) at /usr/src/debug/zlib-ng-2.2.3-1.el10.riscv64/chunkset_tpl.h:147
#3 0x00007fffa5bca6cc in CHUNKCOPY_SAFE (out=<optimized out>, from=<optimized out>, len=<optimized out>, safe=0x55555f4aeb68 "") at /usr/src/debug/zlib-ng-2.2.3-1.el10.riscv64/chunkset_tpl.h:282
#4 inflate_fast_rvv (strm=0x55555f4d0ac0, start=<optimized out>) at /usr/src/debug/zlib-ng-2.2.3-1.el10.riscv64/inffast_tpl.h:262
#5 0x00007fffa5bc4e5c in inflate (strm=strm@entry=0x55555f4d0ac0, flush=flush@entry=0) at /usr/src/debug/zlib-ng-2.2.3-1.el10.riscv64/inflate.c:932
#6 0x00007fffa5bcbcee in gz_decomp (state=state@entry=0x55555f4d0a40) at /usr/src/debug/zlib-ng-2.2.3-1.el10.riscv64/redhat-linux-build-compat/gzread.c:178
#7 0x00007fffa5bcbf86 in gz_read (state=state@entry=0x55555f4d0a40, buf=0x55555f3eeb68, len=786432) at /usr/src/debug/zlib-ng-2.2.3-1.el10.riscv64/redhat-linux-build-compat/gzread.c:327
#8 0x00007fffa5bcc048 in gzread (file=0x55555f4d0a40, buf=<optimized out>, len=<optimized out>) at /usr/src/debug/zlib-ng-2.2.3-1.el10.riscv64/redhat-linux-build-compat/gzread.c:366
#9 0x000055555f394ad2 in decompress_open ()
#10 0x000055555f39c4de in ult_src ()
#11 0x000055555f393b1e in test_manfile ()
#12 0x000055555f394004 in testmandirs ()
#13 0x000055555f39444e in create_db ()
#14 0x000055555f3993ca in process_manpath ()
#15 0x000055555f39314a in main ()
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-06-16 18:31 Olof Johansson New Issue