- status: open --> closed-fixed
- Group: -->
- Priority: -->
version: gnuplot 6.1 last modified 2025-03-05
system: ubuntu 22.04
use this command to reproduce: valgrind gnutplot poc
message from valgrind:
==3802752== Memcheck, a memory error detector
==3802752== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==3802752== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==3802752== Command: ./gnuplot ./bugs/SEGV_load_linetype
==3802752==
Warning: empty x range [1:1], adjusting to [0.99:1.01]
Warning: empty y range [41:41], adjusting to [40.59:41.41]
WARNING: Plotting with 'unknown' terminal.
No output will be generated. Please select a terminal with 'set terminal'.
==3802752== Conditional jump or move depends on uninitialised value(s)
==3802752== at 0x575B41: load_linetype (term.c:2878)
==3802752== by 0x2851BC: apply_variable_color (graphics.c:5311)
==3802752== by 0x2A3AC5: check_for_variable_color (graphics.c:5285)
==3802752== by 0x2A3AC5: plot_lines (graphics.c:1361)
==3802752== by 0x2BB427: do_plot (graphics.c:949)
==3802752== by 0x38A74A: eval_plots (plot2d.c:4136)
==3802752== by 0x1705CB: plot_command (command.c:2174)
==3802752== by 0x16A6E5: command (command.c:855)
==3802752== by 0x16A6E5: step_through_line (command.c:549)
==3802752== by 0x338037: load_file (misc.c:393)
==3802752== by 0x123AE4: main (plot.c:669)
==3802752==
==3802752== Conditional jump or move depends on uninitialised value(s)
==3802752== at 0x575EF7: load_linetype (term.c:2899)
==3802752== by 0x2851BC: apply_variable_color (graphics.c:5311)
==3802752== by 0x2A3AC5: check_for_variable_color (graphics.c:5285)
==3802752== by 0x2A3AC5: plot_lines (graphics.c:1361)
==3802752== by 0x2BB427: do_plot (graphics.c:949)
==3802752== by 0x38A74A: eval_plots (plot2d.c:4136)
==3802752== by 0x1705CB: plot_command (command.c:2174)
==3802752== by 0x16A6E5: command (command.c:855)
==3802752== by 0x16A6E5: step_through_line (command.c:549)
==3802752== by 0x338037: load_file (misc.c:393)
==3802752== by 0x123AE4: main (plot.c:669)
==3802752==
==3802752== Conditional jump or move depends on uninitialised value(s)
==3802752== at 0x5760ED: load_linetype (term.c:2928)
==3802752== by 0x2851BC: apply_variable_color (graphics.c:5311)
==3802752== by 0x2A3AC5: check_for_variable_color (graphics.c:5285)
==3802752== by 0x2A3AC5: plot_lines (graphics.c:1361)
==3802752== by 0x2BB427: do_plot (graphics.c:949)
==3802752== by 0x38A74A: eval_plots (plot2d.c:4136)
==3802752== by 0x1705CB: plot_command (command.c:2174)
==3802752== by 0x16A6E5: command (command.c:855)
==3802752== by 0x16A6E5: step_through_line (command.c:549)
==3802752== by 0x338037: load_file (misc.c:393)
==3802752== by 0x123AE4: main (plot.c:669)
==3802752==
"./bugs/SEGV_load_linetype" line 119: warning: Bad data on line 1 of file -
"./bugs/SEGV_load_linetype" line 120: warning: Bad data on line 2 of file -
"./bugs/SEGV_load_linetype" line 123: warning: Bad data on line 5 of file -
WARNING: Plotting with 'unknown' terminal.
No output will be generated. Please select a terminal with 'set terminal'.
"./bugs/SEGV_load_linetype" line 151: warning: Bad data on line 1 of file -
Warning: empty y range [0:0], adjusting to [-1:1]
WARNING: Plotting with 'unknown' terminal.
No output will be generated. Please select a terminal with 'set terminal'.
==3802752== Invalid read of size 8
==3802752== at 0x23DFA9: plot3d_points (graph3d.c:2167)
==3802752== by 0x260B8B: do_3dplot (graph3d.c:1242)
==3802752== by 0x3B66DD: eval_3dplots (plot3d.c:3057)
==3802752== by 0x173B1D: splot_command (command.c:2749)
==3802752== by 0x16A6E5: command (command.c:855)
==3802752== by 0x16A6E5: step_through_line (command.c:549)
==3802752== by 0x338037: load_file (misc.c:393)
==3802752== by 0x123AE4: main (plot.c:669)
==3802752== Address 0x50 is not stack'd, malloc'd or (recently) free'd
==3802752==
==3802752==
==3802752== Process terminating with default action of signal 11 (SIGSEGV)
==3802752== Access not within mapped region at address 0x50
==3802752== at 0x23DFA9: plot3d_points (graph3d.c:2167)
==3802752== by 0x260B8B: do_3dplot (graph3d.c:1242)
==3802752== by 0x3B66DD: eval_3dplots (plot3d.c:3057)
==3802752== by 0x173B1D: splot_command (command.c:2749)
==3802752== by 0x16A6E5: command (command.c:855)
==3802752== by 0x16A6E5: step_through_line (command.c:549)
==3802752== by 0x338037: load_file (misc.c:393)
==3802752== by 0x123AE4: main (plot.c:669)
==3802752== If you believe this happened as a result of a stack
==3802752== overflow in your program's main thread (unlikely but
==3802752== possible), you can try to increase the size of the
==3802752== main thread stack using the --main-stacksize= flag.
==3802752== The main thread stack size used in this run was 8388608.
==3802752==
==3802752== HEAP SUMMARY:
==3802752== in use at exit: 121,884 bytes in 612 blocks
==3802752== total heap usage: 855 allocs, 243 frees, 337,724 bytes allocated
==3802752==
==3802752== LEAK SUMMARY:
==3802752== definitely lost: 0 bytes in 0 blocks
==3802752== indirectly lost: 0 bytes in 0 blocks
==3802752== possibly lost: 0 bytes in 0 blocks
==3802752== still reachable: 119,868 bytes in 591 blocks
==3802752== suppressed: 0 bytes in 0 blocks
==3802752== Rerun with --leak-check=full to see details of leaked memory
==3802752==
==3802752== Use --track-origins=yes to see where uninitialised values come from
==3802752== For lists of detected and suppressed errors, rerun with: -s
==3802752== ERROR SUMMARY: 161 errors from 4 contexts (suppressed: 0 from 0)
Segmentation fault