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...
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...
I moved them into overflow.h as suggested, and licensed it under BSD 2-Clause.
The same bug in f_sum(): gnuplot> f(x) = x & 1 ? 9007199254740993 : -9007199254740992 gnuplot> print sum[i=1:2] f(i) 0.0
Two edge cases mistakenly treated as overflow: gnuplot> print 9007199254740993 - 9007199254740992 0.0 gnuplot> print -9007199254740992 + 9007199254740993 0.0
"2**100" returns 0 due to compiler optimizations
Memory leaks if commands fail
Cairo uses premultiplied alpha but libwebp requires straight alpha. I think that's the reason.