On Tue, Jul 17, 2012 at 05:50:28PM +0200, Mark Wielaard wrote:
The asserts seem too aggressive/wrong in this case. The following
comment in elf32_getshdr.c (load_shdr_wrlock) explains them:
/* All the data is already mapped. If we could use it
directly this would already have happened. */
But in the case of elf_cntl (ELF_CREAD) this has not yet happened,
unless you already accessed the shdrs before that call.
I think the best solution is to just adjust the asserts to take this
into account. Which is what the attached patch does. It also includes
a testcase. Comments?
Thanks,
Mark