[PATCH] SEGV fixed in dvbpsi_decoder_psi_section_add
Michael Kasch - SmartCast <[email protected]>
| Newsgroups | gmane.comp.video.videolan.libdvbpsi.devel |
|---|---|
| Message-ID | <[email protected]> |
Dear Jean-Paul, I still get an SEGV issue in dvbpsi_decoder_psi_section_add, testing with 1.0.0_pre2 or git HEAD revision. ==13791== Process terminating with default action of signal 11 (SIGSEGV) ==13791== General Protection Fault ==13791== at 0x5C33F83: dvbpsi_decoder_psi_section_add (dvbpsi.c:258) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) I tried debugging with Valgrind, which showed that the error seems to be related to the call of DeletePSISections in (dvbpsi.c:273). See valgrind output excerpt attached at the bottom. Removing this particular line solves the SIGSEV but probably generates a memory leak, so at the moment i don't hava a patch. Regards, Michael ==13791== Invalid read of size 8 ==13791== at 0x5C33FB9: dvbpsi_decoder_psi_section_add (dvbpsi.c:271) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== Address 0x97881f0 is 48 bytes inside a block of size 56 free'd ==13791== at 0x4C27D4E: free (vg_replace_malloc.c:427) ==13791== by 0x5C349CC: dvbpsi_DeletePSISections (psi.c:86) ==13791== by 0x5C33FD0: dvbpsi_decoder_psi_section_add (dvbpsi.c:273) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== ==13791== Invalid write of size 8 ==13791== at 0x5C33FC4: dvbpsi_decoder_psi_section_add (dvbpsi.c:272) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== Address 0x97881f0 is 48 bytes inside a block of size 56 free'd ==13791== at 0x4C27D4E: free (vg_replace_malloc.c:427) ==13791== by 0x5C349CC: dvbpsi_DeletePSISections (psi.c:86) ==13791== by 0x5C33FD0: dvbpsi_decoder_psi_section_add (dvbpsi.c:273) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== ==13791== Invalid read of size 8 ==13791== at 0x5C349B0: dvbpsi_DeletePSISections (psi.c:83) ==13791== by 0x5C33FD0: dvbpsi_decoder_psi_section_add (dvbpsi.c:273) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== Address 0x97881d0 is 16 bytes inside a block of size 56 free'd ==13791== at 0x4C27D4E: free (vg_replace_malloc.c:427) ==13791== by 0x5C349CC: dvbpsi_DeletePSISections (psi.c:86) ==13791== by 0x5C33FD0: dvbpsi_decoder_psi_section_add (dvbpsi.c:273) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== ==13791== Invalid read of size 8 ==13791== at 0x5C349B4: dvbpsi_DeletePSISections (psi.c:81) ==13791== by 0x5C33FD0: dvbpsi_decoder_psi_section_add (dvbpsi.c:273) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== Address 0x97881f0 is 48 bytes inside a block of size 56 free'd ==13791== at 0x4C27D4E: free (vg_replace_malloc.c:427) ==13791== by 0x5C349CC: dvbpsi_DeletePSISections (psi.c:86) ==13791== by 0x5C33FD0: dvbpsi_decoder_psi_section_add (dvbpsi.c:273) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== ==13791== Invalid free() / delete / delete[] / realloc() ==13791== at 0x4C27D4E: free (vg_replace_malloc.c:427) ==13791== by 0x5C349C1: dvbpsi_DeletePSISections (psi.c:84) ==13791== by 0x5C33FD0: dvbpsi_decoder_psi_section_add (dvbpsi.c:273) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== Address 0x9788240 is 0 bytes inside a block of size 4,096 free'd ==13791== at 0x4C27D4E: free (vg_replace_malloc.c:427) ==13791== by 0x5C349C1: dvbpsi_DeletePSISections (psi.c:84) ==13791== by 0x5C33FD0: dvbpsi_decoder_psi_section_add (dvbpsi.c:273) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== ==13791== Invalid free() / delete / delete[] / realloc() ==13791== at 0x4C27D4E: free (vg_replace_malloc.c:427) ==13791== by 0x5C349CC: dvbpsi_DeletePSISections (psi.c:86) ==13791== by 0x5C33FD0: dvbpsi_decoder_psi_section_add (dvbpsi.c:273) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== Address 0x97881c0 is 0 bytes inside a block of size 56 free'd ==13791== at 0x4C27D4E: free (vg_replace_malloc.c:427) ==13791== by 0x5C349CC: dvbpsi_DeletePSISections (psi.c:86) ==13791== by 0x5C33FD0: dvbpsi_decoder_psi_section_add (dvbpsi.c:273) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== ==13791== Invalid read of size 1 ==13791== at 0x5C37D90: dvbpsi_eit_sections_gather (eit.c:349) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== Address 0x75a79da is 10 bytes inside a block of size 56 free'd ==13791== at 0x4C27D4E: free (vg_replace_malloc.c:427) ==13791== by 0x5C349CC: dvbpsi_DeletePSISections (psi.c:86) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== ==13791== Invalid read of size 8 ==13791== at 0x5C37D98: dvbpsi_eit_sections_gather (eit.c:348) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== Address 0x75a7a00 is 48 bytes inside a block of size 56 free'd ==13791== at 0x4C27D4E: free (vg_replace_malloc.c:427) ==13791== by 0x5C349CC: dvbpsi_DeletePSISections (psi.c:86) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== ==13791== ==13791== Process terminating with default action of signal 11 (SIGSEGV) ==13791== General Protection Fault ==13791== at 0x5C33F83: dvbpsi_decoder_psi_section_add (dvbpsi.c:258) ==13791== by 0x5C37CB6: dvbpsi_eit_sections_gather (eit.c:391) ==13791== by 0x5C34555: dvbpsi_packet_push (dvbpsi.c:528) ==13791== by 0x402D31: main (decodeEIT.c:300) ==13791== ==13791== HEAP SUMMARY: ==13791== in use at exit: 4,009,332 bytes in 2,063 blocks ==13791== total heap usage: 126,544 allocs, 124,511 frees, 51,485,037 bytes allocated ==13791== ==13791== LEAK SUMMARY: ==13791== definitely lost: 2,016 bytes in 36 blocks ==13791== indirectly lost: 2,959,312 bytes in 1,407 blocks ==13791== possibly lost: 69,632 bytes in 17 blocks ==13791== still reachable: 978,372 bytes in 603 blocks ==13791== suppressed: 0 bytes in 0 blocks ==13791== Rerun with --leak-check=full to see details of leaked memory ==13791== ==13791== For counts of detected and suppressed errors, rerun with: -v ==13791== ERROR SUMMARY: 1269 errors from 43 contexts (suppressed: 6 from 6) _______________________________________________ libdvbpsi-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libdvbpsi-devel