bug#64254: Bug in initialization with exotic locale

Pavel Dovgalyuk <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
The following call sequence can cause an exception, when the locale is 
not supported:

init_build_info -> scm_from_locale_string -> ... -> decoding_error

Then function scm_throw tries to access throw_var.
But this variable is not initialized yet, beacuse it is initialized in 
scm_init_throw, which will be called later.

Therefore access to throw_var in init_build_info causes segmentation fault.

How to reproduce:

podman run --net=host -it fedora:36 \
    /bin/sh -c 'dnf install -y gdb  glibc-langpack-ru && export 
LC_ALL=ru_RU.KOI8-R; exec gdb'


--
Pavel Dovgalyuk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.