libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] [PATCH 2/2] coredump: add test


From: Martin Milata
Subject: Re: [Libunwind-devel] [PATCH 2/2] coredump: add test
Date: Thu, 31 May 2012 11:13:25 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, May 23, 2012 at 21:21:36 -0700, Arun Sharma wrote:
> On Tue, May 22, 2012 at 2:51 AM, Martin Milata <address@hidden> wrote:
> > Program test-coredump-unwind was modified to map backing files based on
> > virtual addresses instead of segment numbers.
> >
> > The crasher.c is a program that calls some functions and then writes to
> > invalid address causing a crash.
> >
> > The test itself is a shell script, which runs the program. The script
> > then tries to determine the virtual addresses based on output of 'ldd'
> > and 'readelf' and then runs test-coredump-unwind to check whether the
> > stack trace obtained from the dump roughly corresponds to what it should
> > look like.
> 
> You probably want to check for  /proc/sys/kernel/randomize_va_space
> being non-zero and warn.
> 
> Even after that I'm getting a test failure:
> Segmentation fault (core dumped)
> lt-test-coredump-unwind: Can't add backing file
> '/lib/x86_64-linux-gnu/libc.so.6'
> 
> Also a few compile warnings with gcc-4.6.3:
> 
> test-coredump-unwind.c: In function ‘handle_sigsegv’:
> test-coredump-unwind.c:208:15: warning: variable ‘uc’ set but not used
> [-Wunused-but-set-variable]
> test-coredump-unwind.c: In function ‘verror_msg_helper’:
> test-coredump-unwind.c:138:12: warning: ignoring return value of
> ‘write’, declared with attribute warn_unused_result [-Wunused-result]
> test-coredump-unwind.c: In function ‘handle_sigsegv’:
> test-coredump-unwind.c:222:10: warning: ‘ip’ is used uninitialized in
> this function [-Wuninitialized]
> 
> The other patch looks good. I applied it to the 'coredump2' branch,
> merged it into master. It should show up on savannah shortly.
> 
>  -Arun

Thanks for the merge. I'm sending updated patch (also available on my
github branch) for the test -- it now reads the backing files from
/proc/self/maps which should work more reliably, but works only on
linux.

Martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]