[LLVMdev] Will LLVM be suitable for developing valgrind like tools

Devchandra L Meetei dlmeetei at gmail.com
Mon Jan 7 22:59:04 PST 2013


Ok, I will get the address using some CLI

On Tue, Jan 8, 2013 at 11:06 AM, Devchandra L Meetei <dlmeetei at gmail.com>wrote:

> Turns out compiler-rt was missing as pointed out by Kostya.
> Any clue why line number is not printed, It got compiled with -g -O1 along
> with flags specified in the link
> I got following lines on RHEL 6.3
> clang 3.2
>
> ==10474== ERROR: AddressSanitizer: heap-use-after-free on address
> 0x7fb3eb2c6b90 at pc 0x415394 bp 0x7fff49175eb0 sp 0x7fff49175ea8
> READ of size 4 at 0x7fb3eb2c6b90 thread T0
>     #0 0x415393
> (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x415393)
>     #1 0x41619a
> (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x41619a)
>     #2 0x3e8003614c (/lib64/libc-2.12.so+0x3614c)
> 0x7fb3eb2c6b90 is located 16 bytes inside of 64-byte region
> [0x7fb3eb2c6b80,0x7fb3eb2c6bc0)
> freed by thread T0 here:
>     #0 0x4382f2
> (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x4382f2)
>     #1 0x3e80035db1 (/lib64/libc-2.12.so+0x35db1)
> previously allocated by thread T0 here:
>     #0 0x438132
> (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x438132)
>     #1 0x7fb3eb74eebc
> (/home/deleisha/CodeSpace/pegasus/pkg/lib/libpegcommon.so.1+0x1f6ebc)
>     #2 0x7fb3eb749227
> (/home/deleisha/CodeSpace/pegasus/pkg/lib/libpegcommon.so.1+0x1f1227)
>     #3 0x7fb3eb7496dd
> (/home/deleisha/CodeSpace/pegasus/pkg/lib/libpegcommon.so.1+0x1f16dd)
>     #4 0x4283eb
> (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x4283eb)
>     #5 0x428462
> (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x428462)
>     #6 0x4388e5
> (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x4388e5)
>     #7 0x412fa2
> (/home/deleisha/CodeSpace/pegasus/pkg/bin/TestWSMANRequestEncoder+0x412fa2)
>
>
> Thanks
>
>
> On Mon, Jan 7, 2013 at 11:17 PM, Kostya Serebryany <kcc at google.com> wrote:
>
>> Did you checkout compiler-rt?
>> This page has detailed info on building asan:
>> http://code.google.com/p/address-sanitizer/wiki/HowToBuild?tm=4
>>
>> --kcc
>>
>>
>> On Mon, Jan 7, 2013 at 9:38 PM, Devchandra L Meetei <dlmeetei at gmail.com>wrote:
>>
>>> Thanks All
>>> 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.
>>> M very elated to know about ASan, given the fact that LLVM is Compile
>>> time whereas valgrind is Dynamic, need to rethink,
>>>
>>> Can you guys check this. build clang 3.2 but I got this linker error.
>>> Let me also examine closely
>>> 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
>>> /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
>>>
>>>
>>> On Mon, Jan 7, 2013 at 10:13 PM, Duncan Sands <baldrick at free.fr> wrote:
>>>
>>>> Will LLVM be suitable for developing valgrind like tools
>>>>>
>>>>
>>>> It is already used by several such tools, eg ASAN, klee.
>>>>
>>>> Ciao, Duncan.
>>>>
>>>>
>>>> ______________________________**_________________
>>>> LLVM Developers mailing list
>>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>
>>>>
>>>
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130108/0c198476/attachment.html>


More information about the llvm-dev mailing list