GNU bug report logs - #79194
Segfault with 0 byte symbol

Previous Next

Package: guile;

Reported by: a aa <lgray3420 <at> gmail.com>

Date: Thu, 7 Aug 2025 17:36:02 UTC

Severity: normal

Done: Tomas Volf <~@wolfsden.cz>

Full log


View this message in rfc822 format

From: a aa <lgray3420 <at> gmail.com>
To: 79194 <at> debbugs.gnu.org
Subject: bug#79194: Segfault with 0 byte symbol
Date: Thu, 7 Aug 2025 13:35:20 -0400
[Message part 1 (text/plain, inline)]
Hello,

how to reproduce:
cc main.c `pkg-config --libs --cflags guile-3.0` && ./a.out

incorrect behaviour:
The second parameter for scm_from_utf8_symboln should be how many bytes are
pointed to by the pointer however the pointer still gets read if the length
is zero. Being able to handle 0 byte strings is expected since replacing
the call from scm_from_utf8_symboln to scm_from_utf8_stringn will not have
a segfault and the documentation for this function does not mention being
unable to handle 0 byte strings.

version: 3.0.10 (built from source via gentoo ebuild)

config.guess:
x86_64-pc-linux-gnu

config.status:
--prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
--sysconfdir=/etc --localstatedir=/var/lib --datarootdir=/usr/share
--disable-dependency-tracking --disable-silent-rules --disable-static
--docdir=/usr/share/doc/guile-3.0.10-r103
--htmldir=/usr/share/doc/guile-3.0.10-r103/html --with-sysroot=/
--libdir=/usr/lib64 --program-suffix=-3.0
--infodir=/usr/share/guile-data/3.0/info
--with-pkgconfigdir=/usr/share/guile-data/3.0/pkgconfig
--disable-error-on-warning --disable-rpath --disable-lto --enable-posix
--without-libgmp-prefix --without-libiconv-prefix --without-libintl-prefix
--without-libreadline-prefix --without-libunistring-prefix
--disable-guile-debug --disable-debug-malloc --enable-deprecated
--enable-jit --enable-networking --disable-nls --enable-regex
--with-threads build_alias=x86_64-pc-linux-gnu
host_alias=x86_64-pc-linux-gnu CC=gcc 'CFLAGS=-O2 -march=native -pipe
-std=gnu17' LDFLAGS=-fuse-ld=mold
PKG_CONFIG_PATH=/usr/share/guile-data/3.0/pkgconfig
[Message part 2 (text/html, inline)]
[main.c (text/plain, attachment)]

This bug report was last modified 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.