https://bugs.kde.org/show_bug.cgi?id=380037

            Bug ID: 380037
           Summary: valgrind + AddressSanitizer: ASan runtime does not
                    come first in initial library list; you should either
                    link runtime to your application or manually preload
                    it with LD_PRELOAD.
           Product: valgrind
           Version: 3.12.0
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: jsew...@acm.org
          Reporter: minf...@sharp.fm
  Target Milestone: ---

When trying to run valgrind on a binary that has been built linked to
AddressSanitizer, valgrind immediately crashes at startup with a SIGSEGV as
below.

It appears whatever valgrind does to the LD_PRELOAD environment variable breaks
AddressSanitizer, which then causes valgrind to crash.

minfrin@towerofpi9:/var/www/html/stream$ GST_LEAKS_TRACER_STACK_TRACE=1
GST_LEAKS_TRACER_SIG=1 ASAN_OPTIONS=atexit=1
GST_TRACERS="leaks(stack-traces-flags=full,filters=GstMemory,check-refs=true)"
GST_DEBUG_DUMP_DOT_DIR=. G_DEBUG="fatal-warnings"
LD_PRELOAD=/usr/local/gcc-6.2.0/lib/libasan.so.3
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/gcc-6.2.0/lib
/tmp/valgrind/bin/valgrind gst-launch-1.0 --gst-debug-no-color
--gst-debug=1,GST_TRACER:7,GST_REFCOUNTING:0,GST_PADS:1,GST_STATES:5,tdttsparse:5,tsdemux:1,omx:1,omxvideo:1,omxvideodec:1,omxh264dec:1,omxvideoenc:1,omxh264enc:1,videoencoder:1,videorate:1,videoscale:1,mpegtsmux:4,decodebin:1,encodebin:1,h264parse:1,transcoder:5,hlssink:5
udpsrc multicast-iface=eth0 uri=udp://239.106.0.0:1234
"caps=application/x-rtp,media=(string)video,clock-rate=(int)90000" ! rtpbin !
rtpmp2tdepay ! progressreport update-freq=5 ! transcoder name=transcoder !
capsfilter caps=audio/x-raw ! fakesink   transcoder. ! capsfilter
caps=video/mpegts ! hlssink target-duration=0    transcoder. ! capsfilter
caps=audio/x-raw ! fakesink
==4810== Memcheck, a memory error detector
==4810== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==4810== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==4810== Command: gst-launch-1.0 --gst-debug-no-color
--gst-debug=1,GST_TRACER:7,GST_REFCOUNTING:0,GST_PADS:1,GST_STATES:5,tdttsparse:5,tsdemux:1,omx:1,omxvideo:1,omxvideodec:1,omxh264dec:1,omxvideoenc:1,omxh264enc:1,videoencoder:1,videorate:1,videoscale:1,mpegtsmux:4,decodebin:1,encodebin:1,h264parse:1,transcoder:5,hlssink:5
udpsrc multicast-iface=eth0 uri=udp://239.106.0.0:1234
caps=application/x-rtp,media=(string)video,clock-rate=(int)90000 ! rtpbin !
rtpmp2tdepay ! progressreport update-freq=5 ! transcoder name=transcoder !
capsfilter caps=audio/x-raw ! fakesink transcoder. ! capsfilter
caps=video/mpegts ! hlssink target-duration=0 transcoder. ! capsfilter
caps=audio/x-raw ! fakesink
==4810== 
==4810==ASan runtime does not come first in initial library list; you should
either link runtime to your application or manually preload it with LD_PRELOAD.
==4810== Jump to the invalid address stated on the next line
==4810==    at 0x0: ???
==4810==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==4810== 
==4810== 
==4810== Process terminating with default action of signal 11 (SIGSEGV)
==4810==  Bad permissions for mapped region at address 0x0
==4810==    at 0x0: ???
==4810== 
==4810== HEAP SUMMARY:
==4810==     in use at exit: 0 bytes in 0 blocks
==4810==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==4810== 
==4810== All heap blocks were freed -- no leaks are possible
==4810== 
==4810== For counts of detected and suppressed errors, rerun with: -v
==4810== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to