[libcxx] r222051 - add debug info when compiling sanitizer tests

David Blaikie dblaikie at gmail.com
Fri Nov 14 15:19:05 PST 2014


On Fri, Nov 14, 2014 at 2:45 PM, Eric Fiselier <eric at efcs.ca> wrote:

> I seem to get line numbers on certain things (It seems mostly template
> instantiations) that I didn't get before. Here is an example.
> You'll notice in the latter there are lines and files on #3 and #4.
>

Are you sure other parts of the build aren't turning debug info off
somehow? Could you provide a sample command line of, say,
'/tmp/tmpV_pKYRexe+0x4b21bc'?


>
>
>
> =========================== without -g ===================================
>
> WRITE of size 8 at 0x7fff55043588 thread T0
>     #0 0x46b936 in __asan_memcpy /home/eric/full-llvm/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:370:5
>     #1 0x4b673e in uw_install_context_1 (/tmp/tmpV_pKYRexe+0x4b673e)
>     #2 0x4b6d26 in _Unwind_Resume (/tmp/tmpV_pKYRexe+0x4b6d26)
>     #3 0x4b21bc in void std::__1::__assoc_state<int>::set_value<int const&>(int const&) (/tmp/tmpV_pKYRexe+0x4b21bc)
>     #4 0x4a61ff in std::__1::promise<int>::set_value(int const&) (/tmp/tmpV_pKYRexe+0x4a61ff)
>     #5 0x4a3921 in main (/tmp/tmpV_pKYRexe+0x4a3921)
>     #6 0x2adefa479ec4 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4)
>     #7 0x417a16 in _start (/tmp/tmpV_pKYRexe+0x417a16)
>
>
> ============================= with -g ===================================
>
> WRITE of size 8 at 0x7fff614945c8 thread T0
>     #0 0x46b9f6 in __asan_memcpy /home/eric/full-llvm/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:370:5
>     #1 0x4b875e in uw_install_context_1 (/tmp/tmpWegAIsexe+0x4b875e)
>     #2 0x4b8d46 in _Unwind_Resume (/tmp/tmpWegAIsexe+0x4b8d46)
>     #3 0x4b3e57 in void std::__1::__assoc_state<int>::set_value<int const&>(int const&) /home/eric/workspace/libcxx/test/../include/future:656:1
>     #4 0x4a6799 in std::__1::promise<int>::set_value(int const&) /home/eric/workspace/libcxx/test/../include/future:1467:5
>     #5 0x4a39e1 in main /home/eric/workspace/libcxx/test/thread/futures/futures.promise/set_value_const.pass.cpp:40:13
>     #6 0x7fd782e11ec4 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4)
>     #7 0x417ad6 in _start (/tmp/tmpWegAIsexe+0x417ad6)
>
>
>
>
>
> On Fri, Nov 14, 2014 at 3:33 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>> Why -g? sanitizers should enable -gmlt by default which should suffice
>>
>> On Fri, Nov 14, 2014 at 2:18 PM, Eric Fiselier <eric at efcs.ca> wrote:
>>
>>> Author: ericwf
>>> Date: Fri Nov 14 16:18:03 2014
>>> New Revision: 222051
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=222051&view=rev
>>> Log:
>>> add debug info when compiling sanitizer tests
>>>
>>> Modified:
>>>     libcxx/trunk/test/lit.cfg
>>>
>>> Modified: libcxx/trunk/test/lit.cfg
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/lit.cfg?rev=222051&r1=222050&r2=222051&view=diff
>>>
>>> ==============================================================================
>>> --- libcxx/trunk/test/lit.cfg (original)
>>> +++ libcxx/trunk/test/lit.cfg Fri Nov 14 16:18:03 2014
>>> @@ -435,7 +435,7 @@ class Configuration(object):
>>>              llvm_symbolizer = lit.util.which('llvm-symbolizer',
>>>                                               symbolizer_search_paths)
>>>              # Setup the sanitizer compile flags
>>> -            self.compile_flags += ['-fno-omit-frame-pointer']
>>> +            self.compile_flags += ['-g', '-fno-omit-frame-pointer']
>>>              if sys.platform.startswith('linux'):
>>>                  self.link_flags += ['-ldl']
>>>              if san == 'Address':
>>>
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141114/f30ed9dc/attachment.html>


More information about the cfe-commits mailing list