Skip to content

Instantly share code, notes, and snippets.

@Dotz0cat
Created May 12, 2020 06:14
Show Gist options
  • Save Dotz0cat/51cde441c35089f6ca5c3c3f955f1f47 to your computer and use it in GitHub Desktop.
Save Dotz0cat/51cde441c35089f6ca5c3c3f955f1f47 to your computer and use it in GitHub Desktop.
./rajio2 158.69.38.195 20278
ptr:0x7ffcceb99730 size:5120
Segmentation fault (core dumped)
[seth@Arch src]$ valgrind --track-origins=yes --leak-check=full ./rajio2 158.69.38.195 20278
==63825== Memcheck, a memory error detector
==63825== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==63825== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==63825== Command: ./rajio2 158.69.38.195 20278
==63825==
==63825== Conditional jump or move depends on uninitialised value(s)
==63825== at 0x483C969: strcat (vg_replace_strmem.c:310)
==63825== by 0x109375: socket_stuff (main.c:78)
==63825== by 0x1092E2: main (main.c:47)
==63825== Uninitialised value was created by a stack allocation
==63825== at 0x109320: socket_stuff (main.c:65)
==63825==
==63825== Conditional jump or move depends on uninitialised value(s)
==63825== at 0x483C981: strcat (vg_replace_strmem.c:310)
==63825== by 0x1093B7: socket_stuff (main.c:81)
==63825== by 0x1092E2: main (main.c:47)
==63825== Uninitialised value was created by a stack allocation
==63825== at 0x109320: socket_stuff (main.c:65)
==63825==
==63825== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==63825== at 0x60AFAF0: send (in /usr/lib/libpthread-2.31.so)
==63825== by 0x1094CF: socket_stuff (main.c:104)
==63825== by 0x1092E2: main (main.c:47)
==63825== Address 0x1fff000796 is on thread 1's stack
==63825== in frame #1, created by socket_stuff (main.c:65)
==63825== Uninitialised value was created by a stack allocation
==63825== at 0x109320: socket_stuff (main.c:65)
==63825==
==63825== Conditional jump or move depends on uninitialised value(s)
==63825== at 0x62ADF5E: pa_shm_cleanup (in /usr/lib/pulseaudio/libpulsecommon-13.0.so)
==63825== by 0x62AF89F: pa_shm_create_rw (in /usr/lib/pulseaudio/libpulsecommon-13.0.so)
==63825== by 0x62BAB96: pa_mempool_new (in /usr/lib/pulseaudio/libpulsecommon-13.0.so)
==63825== by 0x48B44FA: pa_context_new_with_proplist (in /usr/lib/libpulse.so.0.21.1)
==63825== by 0x487709A: pa_simple_new (in /usr/lib/libpulse-simple.so.0.1.1)
==63825== by 0x109615: play_audio (main.c:124)
==63825== by 0x1094E1: socket_stuff (main.c:105)
==63825== by 0x1092E2: main (main.c:47)
==63825== Uninitialised value was created by a heap allocation
==63825== at 0x483977F: malloc (vg_replace_malloc.c:309)
==63825== by 0x6187CCA: __alloc_dir (in /usr/lib/libc-2.31.so)
==63825== by 0x6187DD9: opendir_tail (in /usr/lib/libc-2.31.so)
==63825== by 0x62ADF2C: pa_shm_cleanup (in /usr/lib/pulseaudio/libpulsecommon-13.0.so)
==63825== by 0x62AF89F: pa_shm_create_rw (in /usr/lib/pulseaudio/libpulsecommon-13.0.so)
==63825== by 0x62BAB96: pa_mempool_new (in /usr/lib/pulseaudio/libpulsecommon-13.0.so)
==63825== by 0x48B44FA: pa_context_new_with_proplist (in /usr/lib/libpulse.so.0.21.1)
==63825== by 0x487709A: pa_simple_new (in /usr/lib/libpulse-simple.so.0.1.1)
==63825== by 0x109615: play_audio (main.c:124)
==63825== by 0x1094E1: socket_stuff (main.c:105)
==63825== by 0x1092E2: main (main.c:47)
==63825==
ptr:0x1ffefff2c0 size:5120
[mp3 @ 0xccb3e40] Format mp3 detected only with low score of 25, misdetection possible!
==63825== Invalid free() / delete / delete[] / realloc()
==63825== at 0x483A9AB: free (vg_replace_malloc.c:540)
==63825== by 0x4933E5E: ??? (in /usr/lib/libavformat.so.58.29.100)
==63825== by 0x4961B13: av_probe_input_buffer2 (in /usr/lib/libavformat.so.58.29.100)
==63825== by 0x4A78ABE: avformat_open_input (in /usr/lib/libavformat.so.58.29.100)
==63825== by 0x10972C: play_audio (main.c:147)
==63825== by 0x1094E1: socket_stuff (main.c:105)
==63825== by 0x1092E2: main (main.c:47)
==63825== Address 0x1ffeffde00 is on thread 1's stack
==63825== in frame #4, created by play_audio (main.c:109)
==63825==
[mp3 @ 0xccb3e40] Skipping 470 bytes of junk at 0.
==63825== Invalid read of size 8
==63825== at 0x109811: play_audio (main.c:162)
==63825== by 0x1094E1: socket_stuff (main.c:105)
==63825== by 0x1092E2: main (main.c:47)
==63825== Address 0xccbc418 is 0 bytes after a block of size 8 alloc'd
==63825== at 0x48396AF: malloc (vg_replace_malloc.c:308)
==63825== by 0x483BDE7: realloc (vg_replace_malloc.c:836)
==63825== by 0x4A793E5: avformat_new_stream (in /usr/lib/libavformat.so.58.29.100)
==63825== by 0x49D614C: ??? (in /usr/lib/libavformat.so.58.29.100)
==63825== by 0x4A787B8: avformat_open_input (in /usr/lib/libavformat.so.58.29.100)
==63825== by 0x10972C: play_audio (main.c:147)
==63825== by 0x1094E1: socket_stuff (main.c:105)
==63825== by 0x1092E2: main (main.c:47)
==63825==
==63825== Invalid read of size 8
==63825== at 0x109815: play_audio (main.c:162)
==63825== by 0x1094E1: socket_stuff (main.c:105)
==63825== by 0x1092E2: main (main.c:47)
==63825== Address 0x8 is not stack'd, malloc'd or (recently) free'd
==63825==
==63825==
==63825== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==63825== Access not within mapped region at address 0x8
==63825== at 0x109815: play_audio (main.c:162)
==63825== by 0x1094E1: socket_stuff (main.c:105)
==63825== by 0x1092E2: main (main.c:47)
==63825== If you believe this happened as a result of a stack
==63825== overflow in your program's main thread (unlikely but
==63825== possible), you can try to increase the size of the
==63825== main thread stack using the --main-stacksize= flag.
==63825== The main thread stack size used in this run was 8388608.
==63825==
==63825== HEAP SUMMARY:
==63825== in use at exit: 211,357 bytes in 990 blocks
==63825== total heap usage: 4,117 allocs, 3,128 frees, 725,570 bytes allocated
==63825==
==63825== 368 bytes in 1 blocks are possibly lost in loss record 231 of 270
==63825== at 0x483BB65: calloc (vg_replace_malloc.c:762)
==63825== by 0x40133E1: allocate_dtv (in /usr/lib/ld-2.31.so)
==63825== by 0x4013D51: _dl_allocate_tls (in /usr/lib/ld-2.31.so)
==63825== by 0x60A615E: pthread_create@@GLIBC_2.2.5 (in /usr/lib/libpthread-2.31.so)
==63825== by 0x62A3BA6: pa_thread_new (in /usr/lib/pulseaudio/libpulsecommon-13.0.so)
==63825== by 0x488B443: pa_threaded_mainloop_start (in /usr/lib/libpulse.so.0.21.1)
==63825== by 0x48770E5: pa_simple_new (in /usr/lib/libpulse-simple.so.0.1.1)
==63825== by 0x109615: play_audio (main.c:124)
==63825== by 0x1094E1: socket_stuff (main.c:105)
==63825== by 0x1092E2: main (main.c:47)
==63825==
==63825== LEAK SUMMARY:
==63825== definitely lost: 0 bytes in 0 blocks
==63825== indirectly lost: 0 bytes in 0 blocks
==63825== possibly lost: 368 bytes in 1 blocks
==63825== still reachable: 210,989 bytes in 989 blocks
==63825== suppressed: 0 bytes in 0 blocks
==63825== Reachable blocks (those to which a pointer was found) are not shown.
==63825== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==63825==
==63825== For lists of detected and suppressed errors, rerun with: -s
==63825== ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment