Question: elf coredump with an extreme program

From: KAMEZAWA Hiroyuki
Date: Thu Jun 11 2009 - 03:17:39 EST


Hi,

At first, I don't have any real problem, now. just curious....

Now, sysctl_max_map_count=65536 at default.

And some (silly) program and increases max_map_count to be very large to
do mmap() more.

Unfortunately, it gets SEGV and generates a core-dump.
But this core is not readable by gdb.

Because it seems ELF format uses 16bit value for # of sections,
coredump header is corrupted in this case. (secions are crated per
vma.)

gdb shouldn't trust the number of sections in elf->e_phnum ?
or is there some workaround technique for this problem ?

BTW, I think default limit of 65536 of vma is too large for usual ELF program.
coredump will be corrupted.

Thanks,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/