Turns out compiler-rt was missing as pointed out by Kostya.<br>Any clue why line number is not printed, It got compiled with -g -O1 along with flags specified in the link<br>I got following lines on RHEL 6.3 <br>clang 3.2 <br>
<br>==10474== ERROR: AddressSanitizer: heap-use-after-free on address 0x7fb3eb2c6b90 at pc 0x415394 bp 0x7fff49175eb0 sp 0x7fff49175ea8<br>READ of size 4 at 0x7fb3eb2c6b90 thread T0<br> #0 0x415393 (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x415393)<br>
#1 0x41619a (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x41619a)<br> #2 0x3e8003614c (/lib64/<a href="http://libc-2.12.so">libc-2.12.so</a>+0x3614c)<br>0x7fb3eb2c6b90 is located 16 bytes inside of 64-byte region [0x7fb3eb2c6b80,0x7fb3eb2c6bc0)<br>
freed by thread T0 here:<br> #0 0x4382f2 (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x4382f2)<br> #1 0x3e80035db1 (/lib64/<a href="http://libc-2.12.so">libc-2.12.so</a>+0x35db1)<br>previously allocated by thread T0 here:<br>
#0 0x438132 (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x438132)<br> #1 0x7fb3eb74eebc (/home/deleisha/CodeSpace/pegasus/pkg/lib/libpegcommon.so.1+0x1f6ebc)<br> #2 0x7fb3eb749227 (/home/deleisha/CodeSpace/pegasus/pkg/lib/libpegcommon.so.1+0x1f1227)<br>
#3 0x7fb3eb7496dd (/home/deleisha/CodeSpace/pegasus/pkg/lib/libpegcommon.so.1+0x1f16dd)<br> #4 0x4283eb (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x4283eb)<br> #5 0x428462 (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x428462)<br>
#6 0x4388e5 (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x4388e5)<br> #7 0x412fa2 (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x412fa2)<br><br><br>Thanks<br><br><div class="gmail_quote">
On Mon, Jan 7, 2013 at 11:17 PM, Kostya Serebryany <span dir="ltr"><<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default">Did you checkout compiler-rt? </div><div class="gmail_default">This page has detailed info on building asan: <a href="http://code.google.com/p/address-sanitizer/wiki/HowToBuild?tm=4" target="_blank">http://code.google.com/p/address-sanitizer/wiki/HowToBuild?tm=4</a></div>
<div class="gmail_default"><br></div><div class="gmail_default">--kcc </div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 7, 2013 at 9:38 PM, Devchandra L Meetei <span dir="ltr"><<a href="mailto:dlmeetei@gmail.com" target="_blank">dlmeetei@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks All<br>In fact, to answer Pete, I was trying to do as much as possible like valgrind including as much as possible, which includes all tools.<br>
M very elated to know about ASan, given the fact that LLVM is Compile time whereas valgrind is Dynamic, need to rethink, <br>
<br>Can you guys check this. build clang 3.2 but I got this linker error. Let me also examine closely<br>clang++ -W -Wall -Wno-unused-parameter -Wno-unused-value -D_GNU_SOURCE -DTHREAD_SAFE -D_REENTRANT -Wno-unused-function -Werror=unused-variable -fsanitize=address -fno-omit-frame-pointer -g -m64 -fvisibility=hidden -fPIC -Xlinker -rpath -Xlinker /home/deleisha/CodeSpace/pegasus/pkg/lib -L/home/deleisha/CodeSpace/pegasus/pkg/lib -o /home/deleisha/CodeSpace/pegasus/pkg/bin/slp_query /home/deleisha/CodeSpace/pegasus/pkg/obj/slp/slp_client/src/cmd-utils/slp_query/slp_query.o -lpegslp_client -ldl -lpthread -lcrypt<br>
/usr/bin/ld: /usr/local/bin/../lib/clang/3.2/lib/linux/libclang_rt.asan-x86_64.a: No such file: No such file or directory<div><div><br><br><div class="gmail_quote">On Mon, Jan 7, 2013 at 10:13 PM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Will LLVM be suitable for developing valgrind like tools<br>
</blockquote>
<br></div>
It is already used by several such tools, eg ASAN, klee.<br>
<br>
Ciao, Duncan.<div><div><br>
<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br>
</div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br>