PuQ - 3 days ago

Version: 6.1 1fb8ac4

Leaks from src/gnuplot -d <demo/fit.dem.

Reduced repros:

gnuplot> splot ""
               ^
         No previous filename

gnuplot> splot ""
               ^
         No previous filename

gnuplot>

=================================================================
ERROR: LeakSanitizer: detected memory leaks

Direct leak of 840 byte(s) in 1 object(s) allocated from:
    #0 0x7f24292198f0 in malloc (/usr/lib/liblsan.so.0+0x198f0)
    #1 0x000001071fd8 in gp_alloc src/alloc.c:56
    #2 0x0000011820b2 in sp_alloc src/plot3d.c:137
    #3 0x00000117e01d in eval_3dplots src/plot3d.c:1743
    #4 0x00000117da92 in plot3drequest src/plot3d.c:398
    #5 0x000001070480 in splot_command src/command.c:2889
gnuplot> print '' . a
         undefined variable: a

gnuplot> print '' . a
         undefined variable: a

gnuplot>

=================================================================
ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x7fe6200198f0 in malloc (/usr/lib/liblsan.so.0+0x198f0)
    #1 0x7fe61fcaf0bf in __strdup (/usr/lib/libc.so.6+0xaf0bf)
    #2 0x000001073105 in gp_strdup src/util.c:408
    #3 0x000001076c85 in push src/eval.c:651
    #4 0x0000011b5e54 in f_pushc src/internal.c:136
    #5 0x000001076d6e in execute_at src/eval.c:754
    #6 0x000001076e57 in evaluate_at src/eval.c:790
    #7 0x0000010e902b in const_express src/parse.c:176
    #8 0x00000106f5a4 in print_command src/command.c:2496
gnuplot> fit x $bytes8
         no datablock named $bytes8

*** FIT ERROR ***
gnuplot> fit x '7bytes'
               ^
         Can't read data from

*** FIT ERROR ***
gnuplot>

=================================================================
ERROR: LeakSanitizer: detected memory leaks

Direct leak of 15 byte(s) in 2 object(s) allocated from:
    #0 0x7f7b268198f0 in malloc (/usr/lib/liblsan.so.0+0x198f0)
    #1 0x7f7b264af0bf in __strdup (/usr/lib/libc.so.6+0xaf0bf)
    #2 0x000001073105 in gp_strdup src/util.c:408
    #3 0x0000010644f9 in fit_main src/fit.c:1708
    #4 0x000001063fdf in fit_command src/fit.c:320
gnuplot> set fit logfile '/doesnt/exist'
gnuplot> fit x '-'
         could not open log-file /doesnt/exist

*** FIT ERROR ***
gnuplot>

=================================================================
ERROR: LeakSanitizer: detected memory leaks

Direct leak of 14 byte(s) in 1 object(s) allocated from:
    #0 0x7f8878a198f0 in malloc (/usr/lib/liblsan.so.0+0x198f0)
    #1 0x7f88786af0bf in __strdup (/usr/lib/libc.so.6+0xaf0bf)
    #2 0x000001073105 in gp_strdup src/util.c:408
    #3 0x0000010679f3 in getfitlogfile src/fit.c:2415
    #4 0x000001064ca9 in fit_main src/fit.c:1873
    #5 0x000001063fdf in fit_command src/fit.c:320