From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24969 invoked by alias); 6 May 2014 09:46:34 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 24946 invoked by uid 48); 6 May 2014 09:46:34 -0000 From: "kirill at shutemov dot name" To: gdb-prs@sourceware.org Subject: [Bug corefiles/16911] New: 'info proc mappings' fails on coredump with more a lot of mappings Date: Tue, 06 May 2014 09:46:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: corefiles X-Bugzilla-Version: 7.6 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kirill at shutemov dot name X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q2/txt/msg00191.txt.bz2 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 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: ... 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 #include #include #include #include #include #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.