This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb and ELF limitation and Linux


Hi,

I encountered following problem recently. Does anyone have a workaround ?

Assume a program which call abort() when mmap(), munmap(), mprotect() failes
with -ENOMEM.  And It makes a core dump.

In this case, the number of program's maps reaches max_map_count(=65536 at
default). When the kernel writes a coredump, a phdr of ELF is made per a map
and some more phdrs are added.

But, elf(32|64)_hdr->e_phnum is 16bit (Elf(32|64)_Half) and it overflows.
As a result, this coredump can't be opened by gdb.

Now, I wonder I should send a patch to lkml to make the default max_map_count
to be smaller (65530 or some).
But max_map_count is configurable for allowing over 65536 maps, anyway.

Thanks,
-Kame










Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]