|
From: Petr M. <mi...@ph...> - 2003-11-24 16:43:21
|
> > There seems to be a bug in file
> > variable.c
> > which sometimes causes 'test palette' to segfault. It shows up in some
> > combinations of save_set(), load_file(), and do_string("reset;");
> >
> > "valgrind" helped to discover the problematic place. It is in routine
> > fontpath_handler(action, path) in case ACTION_GET:
>
> It's hard to discuss the fix without an explanation what the actual bug
> was. How did it segfault?
Try this:
$ valgrind gnuplot
....
Terminal type set to 'x11'
gnuplot> test pal
==30824==
==30824== Conditional jump or move depends on uninitialised value(s)
==30824== at 0x40162EB7: malloc (in /usr/lib/valgrind/valgrind.so)
==30824== by 0x804B0F4: gp_alloc (alloc.c:280)
==30824== by 0x8053A80: test_palette_subcommand (command.c:1363)
==30824== by 0x805216B: command (command.c:507)
gnuplot> test pal
==30824==
==30824== Invalid read of size 1
==30824== at 0x4016371B: strlen (in /usr/lib/valgrind/valgrind.so)
==30824== by 0x80E88BC: fontpath_handler (variable.c:519)
==30824== by 0x809225B: save_set_all (save.c:826)
==30824== by 0x8090807: save_set (save.c:100)
==30824== Address 0x0 is not stack'd, malloc'd or free'd
Segmentation fault
(The 1st report is not an issue for the 2nd.)
---
Petr Mikulik
|