pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/60258: textproc/hyperestraier: Segfaults inside libqdbm remedied by adding -O1 -fno-strict-aliasing
>Number: 60258
>Category: pkg
>Synopsis: textproc/hyperestraier: Segfaults inside libqdbm remedied by adding -O1 -fno-strict-aliasing
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed May 13 11:45:00 +0000 2026
>Originator: Wada Keiji
>Release: 10.1
>Organization:
>Environment:
NetBSD poker 10.1 NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11 UTC 2024 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
When running textproc/hyperestraier compiled with standard pkgsrc optimization flags (-O2), the application immediately terminates with a segmentation fault (SEGV) inside libqdbm.so.14 (from databases/qdbm).
This issue is highly indicative of strict aliasing violations inside either the qdbm database logic or hyperestraier's direct interaction with the library, causing the compiler to emit unsafe optimizations at higher optimization tiers (-O2).
Lowering the optimization level to "-O1" and explicitly forcing "-fno-strict-aliasing" entirely prevents the memory corruption, restoring full stability to hyperestraier.
>How-To-Repeat:
1. Build both databases/qdbm and textproc/hyperestraier on NetBSD using default pkgsrc flags.
2. Execute hyperestraier (e.g., performing a document search or index update).
3. Observe an immediate segmentation fault (SEGV) pointing to libqdbm.so.14.
>Fix:
The issue can be mitigated cleanly by injecting safer compiler flags to both packages. Appending the following logic to /etc/mk.conf successfully fixes the runtime crashes:
.if ${PKGPATH} == "databases/qdbm" || ${PKGPATH} == "textproc/hyperestraier"
CFLAGS+= -O1 -fno-strict-aliasing
.endif
It is suggested that the pkgsrc maintainers add corresponding flags (e.g., using CFLAGS+= -fno-strict-aliasing or adjusting optimization limits) directly to the respective Makefiles in databases/qdbm and textproc/hyperestraier.
Home |
Main Index |
Thread Index |
Old Index