Subject: Re: bug#20614: Segmentation fault when building on Power8 Little Endian

From: Eli Zaretskii <[email-masked]>
Date: Mon, 05 Oct 2015 12:39:12 +0300

> Cc: [email-masked]
> From: Petr Hracek <[email-masked]>
> Date: Mon, 5 Oct 2015 11:16:32 +0200
> 
> (gdb) p old_section_names + NEW_SECTION_H (nn).sh_name
> $2 = 0x4000128ceb51 <Address 0x4000128ceb51 out of bounds>

We have a function valid_pointer_p in alloc.c.  What happens if you
use the same code in unexec, before the series of calls to strcmp that
crash, and only proceed to call strcmp if valid_pointer_p returns a
positive value?