Menu

#2882 6.0.5 segmentation fault on UBUNTU

open
nobody
6.0.5 crash (1)
2 days ago
2026-08-03
Anonymous
No

just for the record:

I tried to install (according to the rules in INSTALL>gnu)
the new version 6.0.5
on UBUNTU 20.04.6 LTS

The installation works fine, but the
executable src/gnuplot
crashes with a segmentation fault right after start (first output)

gnuplot 6.0.4 works (and installs) fine
so Il keep that for the time being

(I tried to compile with -g, but could not make any sense of the gdb output)

Discussion

  • Ethan Merritt

    Ethan Merritt - 2026-08-03

    That is distressing.
    Could you please first double-check that there were no error messages from the configure and make steps For example:

    export CFLAGS="-Wall -g -Og"
    ./configure
    make all >& make.log
    grep WARN config.log
    grep warn make.log
    grep -i error make.log
    

    Then use gdb to run the executable
    Could you please attach a screen-shot or copy/paste the output of gdb after typing where?
    I.e.

    cd src
    gdb ./gnuplot
    (gdb) run
    ... As I understand it you get a crash immediately here.
    ... When that happens, type "where" and report everything that follows.
    ... Here is a sample; yours won't look exactly like this
    (gdb) where
    #0  0x00007ffff491c79d in read () at /lib64/libc.so.6
    #1  0x00007ffff48aa5dc in __GI__IO_file_underflow () at /lib64/libc.so.6
    #2  0x00007ffff48ab952 in _IO_default_uflow () at /lib64/libc.so.6
    #3  0x00000000004a0818 in getc_wrapper (fp=0x7ffff49f1a80 <_IO_2_1_stdin_>) at readline.c:86
    #4  0x00007ffff7f7814b in rl_read_key () at /lib64/libreadline.so.8
    #5  0x00007ffff7f5b97f in readline_internal_char () at /lib64/libreadline.so.8
    #6  0x00007ffff7f5c305 in readline () at /lib64/libreadline.so.8
    #7  0x000000000042dca1 in rlgets (s=0x6926d0 "", n=2048, prompt=<optimized out>)
        at command.c:3683
    #8  0x000000000042dd74 in gp_get_string
        (buffer=<optimized out>, len=<optimized out>, prompt=<optimized out>) at command.c:3854
    #9  0x000000000042e8d8 in read_line
        (prompt=prompt@entry=0x546ab4 "gnuplot> ", start=start@entry=0) at command.c:3893
    #10 0x00000000004325f7 in com_line () at command.c:421
    #11 0x000000000048be94 in main (argc_orig=<optimized out>, argv=0x7fffffffdd28) at plot.c:654
    
     
  • PuQ

    PuQ - 3 days ago

    I got a segfault when running src/gnuplot -d <demo/mask_pm3d.dem, perhaps related to this bug.

    Reduced repro:

    gnuplot> set table $HULL
    gnuplot> unset table
    gnuplot> plot $HULL
    AddressSanitizer:DEADLYSIGNAL
    =================================================================
    ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000
    The signal is caused by a READ memory access.
    Hint: address points to the zero page.
        #0 0x000001103adc in df_gets src/datafile.c:633
        #1 0x0000010fa82e in df_readascii src/datafile.c:1936
        #2 0x0000010f59f6 in df_readline src/datafile.c:1891
        #3 0x0000012e5213 in get_data src/plot2d.c:723
        #4 0x0000012d6e79 in eval_plots src/plot2d.c:3349
        #5 0x0000012cb789 in plotrequest src/plot2d.c:345
        #6 0x0000010d3720 in plot_command src/command.c:2262
        #7 0x0000010ce3b1 in command src/command.c:863
        #8 0x0000010cd951 in step_through_line src/command.c:546
        #9 0x0000010ccf1f in do_line src/command.c:443
        #10 0x0000010cca38 in com_line src/command.c:431
        #11 0x0000010bbb29 in main src/plot.c:683
    SUMMARY: AddressSanitizer: SEGV src/datafile.c:633 in df_gets
    

    Broken by [7bbf83].

     

    Related

    Commit: [7bbf83]

    • Ethan Merritt

      Ethan Merritt - 2 days ago

      I am puzzled. Your minimal reproducer is a real bug (trying to plot from an empty data block). I pushed a fix to both 6.0 and 6.1

      But that pattern does not occur in mask_pm3d.dem. I cannot reproduce failure with that demo either before or after the fix.

      Edit: OK, I see that the problem could occur with that demo if the loadpath, or GNUPLOT_LIB, is set incorrectly. Then it would try to create a data block from a file not in the search path, resulting in an empty data block.

       

      Last edit: Ethan Merritt 2 days ago

Log in to post a comment.

MongoDB Logo MongoDB