This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug corefiles/16911] New: 'info proc mappings' fails on coredump with more a lot of mappings
- From: "kirill at shutemov dot name" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 06 May 2014 09:46:32 +0000
- Subject: [Bug corefiles/16911] New: 'info proc mappings' fails on coredump with more a lot of mappings
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16911
Bug ID: 16911
Summary: 'info proc mappings' fails on coredump with more a lot
of mappings
Product: gdb
Version: 7.6
Status: NEW
Severity: normal
Priority: P2
Component: corefiles
Assignee: unassigned at sourceware dot org
Reporter: kirill at shutemov dot name
info proc mappings' fails on coredump with more then 64k mappings.
$ gdb -ex 'info proc mappings' -ex 'quit' ./many-vma core
GNU gdb (GDB) 7.6.2 (Debian 7.6.2-1)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /host/home/space/kas/var/many-vma...(no debugging symbols
found)...done.
[New LWP 96]
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Core was generated by `/host/home/kas/var/many-vma'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f98c7bd4697 in kill () at ../sysdeps/unix/syscall-template.S:81
81 ../sysdeps/unix/syscall-template.S: No such file or directory.
warning: unable to find mappings in core file
objdump and readelf report correct number of segments in ELF:
$ objdump -h core | grep -c load
100018
$ readelf -h core | grep 'Number of program headers'
Number of program headers: 65535 (100017)
I would guess the bug connected with wrong or missing PN_XNUM handling.
Test case to generate 100k of mappings and sigfault:
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/types.h>
#define N 100000
int main(int argc, char **argv)
{
int i;
void *p;
for (i = 0; i < N; i++) {
p = mmap(NULL, 4096, PROT_NONE, MAP_SHARED | MAP_ANONYMOUS,
-1, 0);
if (p == MAP_FAILED)
break;
}
printf("map: %d\n", i);
kill(getpid(), SIGSEGV);
return 0;
}
--
You are receiving this mail because:
You are on the CC list for the bug.