Menu ▾ ▴

#2904 Segmentation fault when locale is not valid

None
pending-fixed
nobody
None
2026-11-18
2026-11-18
Anonymous
No

gnuplot crashes with segmentation fault when run with invalid locale configuration.

How to reproduce:

$ LC_ALL=bad_locale gnuplot

Backtrace of the crash with gnuplot built from current state of master branch:

(gdb) bt
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:76
#1  0x00007f66d04af333 in __GI___strdup (s=s@entry=0x0) at strdup.c:41
#2  0x0000559b5b7bb5e7 in locale_handler (action=action@entry=1, newlocale=newlocale@entry=0x0) at gplocale.c:80
#3  0x0000559b5b77ed3d in main (argc_orig=<optimized out>, argv=0x7ffdbabd0f98) at plot.c:443

It seems like the issue is introduced by this commit. At least gnuplot built from one of previous commits does not reproduce the issue.

Related topic on Arch Linux forum: https://bbs.archlinux.org/viewtopic.php?id=315535

Discussion

  • Ethan Merritt

    Ethan Merritt - 2026-11-18
    • status: open --> pending-fixed
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2026-11-18

    fixed
    thanks for the report

     
    ❤️
    1

Log in to post a comment.