diff options
| author | Bjoern A. Zeeb <bz@freebsd.org> | 2026-04-11 16:24:32 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2026-04-11 16:28:00 +0000 |
| commit | de2ea5423cc63b62e7e42d11b667aa634109fc28 (patch) | |
| tree | 0eca1ab78bff3924f1d523e5b0c4be95f82f4455 /crypto/heimdal/doc/ssh:/git@gitrepo.FreeBSD.org/src.git | |
| parent | 5f5cc3c67ae8a4d9a27e750bef98a9ce1a6b2cf5 (diff) | |
zstd's tracing API (zstd_trace.h) declares ZSTD_trace_compress_begin()
and friends as __attribute__((weak)) externals, gated on the
ZSTD_HAVE_WEAK_SYMBOLS compile-time probe. That probe has covered
x86_64 and i386 since at least zstd 1.5.6, and was extended to aarch64
and riscv in 1.5.7.
In a static kernel image there is no dynamic linker to patch the PLT GOT
entries at runtime. On amd64 the undefined weak symbols resolve directly
to NULL, so the "!= NULL" guard in the zstd source correctly suppresses
every call through the stubs. On aarch64 and riscv the ABI requires
GOT-based indirection for external calls: the PLT stub address is
non-NULL, the guard passes, and the call lands in an uninitialized GOT
slot. Because this happens before exception handlers are in place the
machine resets silently, making the kernel unbootable after the zstd
1.5.7 import.
The upstream-supported suppression is ZSTD_NO_TRACE (zstd_internal.h),
which skips inclusion of zstd_trace.h entirely and forces ZSTD_TRACE=0.
Add it to ZSTD_C alongside the existing ZSTD_* defines, and while here
group all three -DZSTD_* flags onto a single line in alphabetical order
with ${.IMPSRC} on its own line.
Reported by: many
Tested by: lwhsu
X-MFC-with: c0d9a07101a1
Diffstat (limited to 'crypto/heimdal/doc/ssh:/git@gitrepo.FreeBSD.org/src.git')
0 files changed, 0 insertions, 0 deletions
