Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2019)

Issue 6303097: [Sanitizer] more symbolizer code (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by samsonov
Modified:
11 years, 10 months ago
Base URL:
https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/
Visibility:
Public.

Description

This patch extends symbolizer code. In order to symbolize a module, a symbolizer maps it into memory and obtains pointers to necessary debug info sections (last part is implemented on Linux only). Later these pointers can be passed to constructor of DWARF context-in-memory from LLVM DebugInfo lib.

Patch Set 1 #

Total comments: 10

Patch Set 2 : z #

Patch Set 3 : z #

Total comments: 10

Patch Set 4 : z #

Patch Set 5 : xz #

Unified diffs Side-by-side diffs Delta from patch set Stats (+280 lines, -75 lines) Patch
M asan/asan_stack.cc View 1 2 1 chunk +8 lines, -2 lines 0 comments Download
M sanitizer_common/sanitizer_common.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M sanitizer_common/sanitizer_linux.cc View 1 2 3 4 3 chunks +86 lines, -1 line 0 comments Download
M sanitizer_common/sanitizer_mac.cc View 1 2 3 4 2 chunks +12 lines, -0 lines 0 comments Download
M sanitizer_common/sanitizer_posix.cc View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M sanitizer_common/sanitizer_procmaps.h View 1 2 1 chunk +11 lines, -1 line 0 comments Download
M sanitizer_common/sanitizer_symbolizer.h View 1 2 3 4 1 chunk +39 lines, -0 lines 0 comments Download
M sanitizer_common/sanitizer_symbolizer.cc View 1 2 3 4 2 chunks +91 lines, -71 lines 0 comments Download
M sanitizer_common/sanitizer_win.cc View 1 2 3 4 3 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 18
dvyukov
http://codereview.appspot.com/6303097/diff/1/sanitizer_common/sanitizer_common.h File sanitizer_common/sanitizer_common.h (right): http://codereview.appspot.com/6303097/diff/1/sanitizer_common/sanitizer_common.h#newcode82 sanitizer_common/sanitizer_common.h:82: // Debug info routines Looks like a wrong place ...
11 years, 10 months ago (2012-06-18 18:18:38 UTC) #1
samsonov
http://codereview.appspot.com/6303097/diff/1/sanitizer_common/sanitizer_common.h File sanitizer_common/sanitizer_common.h (right): http://codereview.appspot.com/6303097/diff/1/sanitizer_common/sanitizer_common.h#newcode82 sanitizer_common/sanitizer_common.h:82: // Debug info routines On 2012/06/18 18:18:38, dvyukov wrote: ...
11 years, 10 months ago (2012-06-20 09:43:39 UTC) #2
dvyukov
On Wed, Jun 20, 2012 at 5:43 AM, <samsonov@google.com> wrote: > Reviewers: dvyukov, kcc1, > ...
11 years, 10 months ago (2012-06-20 10:22:59 UTC) #3
samsonov
On Wed, Jun 20, 2012 at 2:22 PM, Dmitry Vyukov <dvyukov@google.com> wrote: > > > ...
11 years, 10 months ago (2012-06-20 10:30:52 UTC) #4
kcc1
On Wed, Jun 20, 2012 at 2:30 PM, Alexey Samsonov <samsonov@google.com>wrote: > > > On ...
11 years, 10 months ago (2012-06-20 10:35:23 UTC) #5
dvyukov
On Wed, Jun 20, 2012 at 6:30 AM, Alexey Samsonov <samsonov@google.com>wrote: > http://codereview.appspot.com/**6303097/diff/1/sanitizer_** >>> common/sanitizer_common.h<http://codereview.appspot.com/6303097/diff/1/sanitizer_common/sanitizer_common.h> ...
11 years, 10 months ago (2012-06-20 10:40:43 UTC) #6
dvyukov
On Wed, Jun 20, 2012 at 6:30 AM, Alexey Samsonov <samsonov@google.com>wrote: > http://codereview.appspot.com/**6303097/diff/1/sanitizer_** >>> common/sanitizer_common.h<http://codereview.appspot.com/6303097/diff/1/sanitizer_common/sanitizer_common.h> ...
11 years, 10 months ago (2012-06-20 10:40:58 UTC) #7
dvyukov
On Wed, Jun 20, 2012 at 6:35 AM, Kostya Serebryany <kcc@google.com> wrote: > >>>> http://codereview.appspot.com/**6303097/diff/1/sanitizer_** ...
11 years, 10 months ago (2012-06-20 10:44:16 UTC) #8
kcc1
On Wed, Jun 20, 2012 at 2:44 PM, Dmitry Vyukov <dvyukov@google.com> wrote: > On Wed, ...
11 years, 10 months ago (2012-06-20 10:52:48 UTC) #9
samsonov
On Wed, Jun 20, 2012 at 2:44 PM, Dmitry Vyukov <dvyukov@google.com> wrote: > On Wed, ...
11 years, 10 months ago (2012-06-20 12:07:39 UTC) #10
dvyukov
On Wed, Jun 20, 2012 at 4:07 PM, Alexey Samsonov <samsonov@google.com>wrote: > >>>>>> http://codereview.appspot.com/**6303097/diff/1/sanitizer_** >>>>>> ...
11 years, 10 months ago (2012-06-21 04:56:56 UTC) #11
Evgeniy Stepanov
AFAIK, we just used it wrong for the shared libraries. The actual difference, as I ...
11 years, 10 months ago (2012-06-21 11:08:08 UTC) #12
samsonov
On Thu, Jun 21, 2012 at 8:56 AM, Dmitry Vyukov <dvyukov@google.com> wrote: > On Wed, ...
11 years, 10 months ago (2012-07-02 09:12:59 UTC) #13
dvyukov
http://codereview.appspot.com/6303097/diff/16001/asan/asan_stack.cc File asan/asan_stack.cc (right): http://codereview.appspot.com/6303097/diff/16001/asan/asan_stack.cc#newcode62 asan/asan_stack.cc:62: } else if (info.module) { It still prints nothing ...
11 years, 10 months ago (2012-07-02 09:29:33 UTC) #14
samsonov
http://codereview.appspot.com/6303097/diff/16001/asan/asan_stack.cc File asan/asan_stack.cc (right): http://codereview.appspot.com/6303097/diff/16001/asan/asan_stack.cc#newcode62 asan/asan_stack.cc:62: } else if (info.module) { On 2012/07/02 09:29:33, dvyukov ...
11 years, 10 months ago (2012-07-02 10:01:01 UTC) #15
dvyukov
http://codereview.appspot.com/6303097/diff/16001/asan/asan_stack.cc File asan/asan_stack.cc (right): http://codereview.appspot.com/6303097/diff/16001/asan/asan_stack.cc#newcode62 asan/asan_stack.cc:62: } else if (info.module) { Ah, OK. On 2012/07/02 ...
11 years, 10 months ago (2012-07-02 10:34:24 UTC) #16
samsonov
On 2012/07/02 10:34:24, dvyukov wrote: > http://codereview.appspot.com/6303097/diff/16001/asan/asan_stack.cc > File asan/asan_stack.cc (right): > > http://codereview.appspot.com/6303097/diff/16001/asan/asan_stack.cc#newcode62 > ...
11 years, 10 months ago (2012-07-02 14:39:24 UTC) #17
dvyukov
11 years, 10 months ago (2012-07-03 07:17:42 UTC) #18
On 2012/07/02 14:39:24, samsonov wrote:
> On 2012/07/02 10:34:24, dvyukov wrote:
> > http://codereview.appspot.com/6303097/diff/16001/asan/asan_stack.cc
> > File asan/asan_stack.cc (right):
> > 
> >
http://codereview.appspot.com/6303097/diff/16001/asan/asan_stack.cc#newcode62
> > asan/asan_stack.cc:62: } else if (info.module) {
> > Ah, OK.
> > 
> > On 2012/07/02 10:01:01, samsonov wrote:
> > > On 2012/07/02 09:29:33, dvyukov wrote:
> > > > It still prints nothing in some cases. Please print at least pc as it is
> > done
> > > 
> > > Does it? See line 56.
> > > 
> > > > below:
> > > > AsanPrintf("    #%zu 0x%zx\n", frame_num, pc);
> > >
> > 
> >
>
http://codereview.appspot.com/6303097/diff/16001/sanitizer_common/sanitizer_l...
> > File sanitizer_common/sanitizer_linux.cc (right):
> > 
> >
>
http://codereview.appspot.com/6303097/diff/16001/sanitizer_common/sanitizer_l...
> > sanitizer_common/sanitizer_linux.cc:223: beg = Min(beg, cur_beg);
> > On 2012/07/02 10:01:01, samsonov wrote:
> > > On 2012/07/02 09:29:33, dvyukov wrote:
> > > > AFAIR, modules are not necessary continuous in memory.
> > > 
> > > Yes, and we're in trouble if two modules can have segments interleaving in
> > > memory. Do you know if they can?
> > 
> > I've seen such thing with dl.so. It overlaps with half of other modules.
> 
> Yes, we'll have to go hard way here. Updated the patch.


LGTM

> 
> > $ cat /proc/self/maps
> > 00400000-0040d000 r-xp 00000000 fc:00 1048699                           
> > /bin/cat
> > 0060d000-0060e000 r--p 0000d000 fc:00 1048699                           
> > /bin/cat
> > 0060e000-0060f000 rw-p 0000e000 fc:00 1048699                           
> > /bin/cat
> > 020f3000-02114000 rw-p 00000000 00:00 0                                 
> [heap]
> > 7f5a6c89b000-7f5a6ca15000 r-xp 00000000 fc:00 668767                    
> > /lib/libc-2.11.1.so
> > 7f5a6ca15000-7f5a6cc14000 ---p 0017a000 fc:00 668767                    
> > /lib/libc-2.11.1.so
> > 7f5a6cc14000-7f5a6cc18000 r--p 00179000 fc:00 668767                    
> > /lib/libc-2.11.1.so
> > 7f5a6cc18000-7f5a6cc19000 rw-p 0017d000 fc:00 668767                    
> > /lib/libc-2.11.1.so
> > 7f5a6cc19000-7f5a6cc1e000 rw-p 00000000 00:00 0 
> > 7f5a6cc1e000-7f5a6cc3e000 r-xp 00000000 fc:00 661626                    
> > /lib/ld-2.11.1.so
> > 7f5a6ccb9000-7f5a6ccf8000 r--p 00000000 fc:00 2098188                   
> > /usr/lib/locale/en_US.utf8/LC_CTYPE
> > 7f5a6ccf8000-7f5a6ce16000 r--p 00000000 fc:00 2097996                   
> > /usr/lib/locale/en_US.utf8/LC_COLLATE
> > 7f5a6ce16000-7f5a6ce19000 rw-p 00000000 00:00 0 
> > 7f5a6ce2a000-7f5a6ce2b000 r--p 00000000 fc:00 2098195                   
> > /usr/lib/locale/en_US.utf8/LC_NUMERIC
> > 7f5a6ce2b000-7f5a6ce2c000 r--p 00000000 fc:00 2098609                   
> > /usr/lib/locale/en_US.utf8/LC_TIME
> > 7f5a6ce2c000-7f5a6ce2d000 r--p 00000000 fc:00 2098614                   
> > /usr/lib/locale/en_US.utf8/LC_MONETARY
> > 7f5a6ce2d000-7f5a6ce2e000 r--p 00000000 fc:00 2098619                   
> > /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
> > 7f5a6ce2e000-7f5a6ce2f000 r--p 00000000 fc:00 2097749                   
> > /usr/lib/locale/en_US.utf8/LC_PAPER
> > 7f5a6ce2f000-7f5a6ce30000 r--p 00000000 fc:00 2097513                   
> > /usr/lib/locale/en_US.utf8/LC_NAME
> > 7f5a6ce30000-7f5a6ce31000 r--p 00000000 fc:00 2098629                   
> > /usr/lib/locale/en_US.utf8/LC_ADDRESS
> > 7f5a6ce31000-7f5a6ce32000 r--p 00000000 fc:00 2098634                   
> > /usr/lib/locale/en_US.utf8/LC_TELEPHONE
> > 7f5a6ce32000-7f5a6ce33000 r--p 00000000 fc:00 2097802                   
> > /usr/lib/locale/en_US.utf8/LC_MEASUREMENT
> > 7f5a6ce33000-7f5a6ce3a000 r--s 00000000 fc:00 1720697                   
> > /usr/lib/gconv/gconv-modules.cache
> > 7f5a6ce3a000-7f5a6ce3b000 r--p 00000000 fc:00 2098638                   
> > /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION
> > 7f5a6ce3b000-7f5a6ce3d000 rw-p 00000000 00:00 0 
> > 7f5a6ce3d000-7f5a6ce3e000 r--p 0001f000 fc:00 661626                    
> > /lib/ld-2.11.1.so
> > 7f5a6ce3e000-7f5a6ce3f000 rw-p 00020000 fc:00 661626                    
> > /lib/ld-2.11.1.so
> > 7f5a6ce3f000-7f5a6ce40000 rw-p 00000000 00:00 0 
> > 7fff2582f000-7fff25850000 rw-p 00000000 00:00 0                         
> [stack]
> > 7fff2585c000-7fff2585d000 r-xp 00000000 00:00 0                         
> [vdso]
> > ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                 
> > [vsyscall]
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b