On Tue, May 22, 2012 at 2:51 AM, Martin Milata <[email protected]> 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 _______________________________________________ Libunwind-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/libunwind-devel
