[Gtkwave-users] segfault when reloading fst waveform during simulation
Brought to you by:
gtkwave,
joel1234567
From: Sophana K <sop...@gm...> - 2012-12-06 12:40:46
|
Hi While reloading waveform during a running simulation, we get segfaults very often. (simulation is done on another computer through NFS, os is linux RHEL6.2). It seems we did have such behaviour with older releases (not sure about this) Below is a gdb stack. Looking a little more, it looks that in fstReaderIterBlocks2, line 3841, ucdata is null (return of malloc). I don't have the value of tsec_uclen (input of malloc) which has been optimized out, but it could be high, as it comes from a fstReaderUint64 and is not checked. Other values that are read also have very high values which are probably garbage. Note that there is a fseeko call juste before the read, and I don't know if the seek return is checked. Is there a fix you could suggest? simply check malloc return? or check tsec_uclen value? or check fseeko? Best regards #0 fstGetVarint64 (skiplen=<optimized out>, mem=0x0) at fstapi.c:322 #1 fstReaderIterBlocks2 (ctx=<optimized out>, value_change_callback=0x41d8d0 <fst_callback>, value_change_callback_varlen=0x41d4d0 <fst_callback2>, user_callback_data_pointer=0x0, fv=0x0) at fstapi.c:3874 #2 0x000000000041d16d in fst_import_masked () at fst.c:1342 #3 0x0000000000459641 in read_save_helper (wname=0xf21d70 "/tmp/gtkwavezT7Wml", dumpfile=0x0, savefile=0x0, dumpsiz=0x0, dumptim=0x0, opt_vcd=0x0) at savefile.c:777 #4 0x000000000040e037 in reload_into_new_context_2 () at globals.c:2276 #5 0x000000000040eb13 in reload_into_new_context () at globals.c:2476 #6 0x0000003f2aa0bb3e in g_closure_invoke () from /lib64/libgobject-2.0.so.0 #7 0x0000003f2aa20e23 in ?? () from /lib64/libgobject-2.0.so.0 #8 0x0000003f2aa220af in g_signal_emit_valist () from /lib64/libgobject-2.0.so.0 #9 0x0000003f2aa225f3 in g_signal_emit () from /lib64/libgobject-2.0.so.0 #10 0x000000315b07e99e in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #11 0x0000003f2aa0bb3e in g_closure_invoke () from /lib64/libgobject-2.0.so.0 #12 0x0000003f2aa20e23 in ?? () from /lib64/libgobject-2.0.so.0 #13 0x0000003f2aa21f4a in g_signal_emit_valist () from /lib64/libgobject-2.0.so.0 #14 0x0000003f2aa225f3 in g_signal_emit () from /lib64/libgobject-2.0.so.0 #15 0x000000315ae6cd14 in gtk_accel_group_activate () from /usr/lib64/libgtk-x11-2.0.so.0 #16 0x000000315ae6ce1d in gtk_accel_groups_activate () from /usr/lib64/libgtk-x11-2.0.so.0 #17 0x000000315b08fab2 in gtk_window_activate_key () from /usr/lib64/libgtk-x11-2.0.so.0 #18 0x000000315b0911d7 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #19 0x000000315af53ef3 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #20 0x0000003f2aa0bb3e in g_closure_invoke () from /lib64/libgobject-2.0.so.0 #21 0x0000003f2aa209ed in ?? () from /lib64/libgobject-2.0.so.0 #22 0x0000003f2aa21f4a in g_signal_emit_valist () from /lib64/libgobject-2.0.so.0 #23 0x0000003f2aa225f3 in g_signal_emit () from /lib64/libgobject-2.0.so.0 #24 0x000000315b076b2f in ?? () from /usr/lib64/libgtk-x11-2.0.so.0 #25 0x000000315af4ad65 in gtk_propagate_event () from /usr/lib64/libgtk-x11-2.0.so.0 #26 0x000000315af4bddc in gtk_main_do_event () from /usr/lib64/libgtk-x11-2.0.so.0 #27 0x000000315b65fffc in ?? () from /usr/lib64/libgdk-x11-2.0.so.0 #28 0x0000003f29e38f0e in g_main_context_dispatch () from /lib64/libglib-2.0.so.0 #29 0x0000003f29e3c938 in ?? () from /lib64/libglib-2.0.so.0 #30 0x0000003f29e3cd55 in g_main_loop_run () from /lib64/libglib-2.0.so.0 #31 0x000000315af4c2c7 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0 #32 0x000000000043cf9a in main_2 (opt_vcd=0, argc=2, argv=0x7fffffffdef8) at main.c:2547 #33 0x0000003f28a1ecdd in __libc_start_main () from /lib64/libc.so.6 #34 0x000000000040ad79 in _start () |