Ticket #133 (closed bug: fixed)
Memory hog in libisofs bzr vreixo 392
| Reported by: | scdbackup | Owned by: | vreixo |
|---|---|---|---|
| Priority: | blocker | Milestone: | libisofs-0.6.4 |
| Component: | libisofs [old] | Version: | |
| Keywords: | Cc: |
Description
To prepare for a new release of xorriso i switched from revision 387 to 392.
Now i get a SIGSEGV at the end of this command:
xorriso -dev /dev/hdc -toc
The program run does what is expected but crashes when the memory gets cleaned up finally.
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) where
#0 0x0000000000000000 in ?? ()
#1 0x0000000000470431 in iso_node_unref (node=0xb1e380) at libisofs/node.c:79
#2 0x00000000004703b7 in iso_node_unref (node=0xb1d530) at libisofs/node.c:52
#3 0x00000000004703b7 in iso_node_unref (node=0xb169a0) at libisofs/node.c:52
#4 0x00000000004703b7 in iso_node_unref (node=0xb06dc0) at libisofs/node.c:52
#5 0x00000000004703b7 in iso_node_unref (node=0xa44560) at libisofs/node.c:52
#6 0x00000000004703b7 in iso_node_unref (node=0x7121f0) at libisofs/node.c:52
#7 0x0000000000469bc9 in iso_image_unref (image=0x711c70)
at libisofs/image.c:107
#8 0x00000000004584ac in isoburn_destroy (objpt=0x7fff418b5410, flag=0)
at libisoburn/isoburn.c:122
#9 0x000000000045acee in isoburn_drive_release (drive=0x6a0060, eject=0)
at libisoburn/burn_wrap.c:581
#10 0x0000000000428338 in Xorriso_give_up_drive (xorriso=0x2af869208010,
flag=3) at ./libisoburn-develop/xorriso/xorrisoburn.c:715
#11 0x000000000041dc83 in Xorriso_option_end (xorriso=0x2af869208010, flag=0)
at ./libisoburn-develop/xorriso/xorriso.c:8948
#12 0x00000000004242b3 in Xorriso_interpreter (xorriso=0x2af869208010, argc=2,
argv=0x75fc20, idx=0x7fff418bb5cc, flag=0)
at ./libisoburn-develop/xorriso/xorriso.c:11119
#13 0x00000000004258c8 in Xorriso_execute_option (xorriso=0x2af869208010,
line=0x7fff418bb600 "end", flag=131072)
at ./libisoburn-develop/xorriso/xorriso.c:11459
---Type <return> to continue, or q <return> to quit---
#14 0x0000000000425c7c in Xorriso_dialog (xorriso=0x2af869208010, flag=0)
at ./libisoburn-develop/xorriso/xorriso.c:11515
#15 0x00000000004265ff in main (argc=16, argv=0x7fff418bd728)
at ./libisoburn-develop/xorriso/xorriso.c:11755
I switched back to revision 387 and all is well again. So i strongly believe that the problem is related to 392.
The media is a CD-RW with 27 sessions on it. A disk file does not cause a crash.
I put a breakpoint into node.c at line 74 where the extended info is non-NULL and thus to be freed. This breakpoint gets hit only with the CD-RW but not with the disk file. Some time after the breakpoint was hit, the program had a SIGSEGV again.
xorriso does not call iso_node_add_xinfo(). So i assume all ->xinfo should be NULL. But i see
Breakpoint 5, iso_node_unref (node=0xb1e3f0) at libisofs/node.c:74 74 IsoExtendedInfo *info = node->xinfo; (gdb) p node->xinfo $3 = (IsoExtendedInfo *) 0xb1e360
