[OE-core] [PATCH 1/2 RFC] rpm: Add workaround for debugedit-segv

Mark Hatle mark.hatle at windriver.com
Mon Mar 25 17:10:29 UTC 2013


On 3/25/13 12:02 PM, Phil Blundell wrote:
> On Mon, 2013-03-25 at 12:19 -0500, Mark Hatle wrote:
>> +Sections 23 and 24 (.plt and .bss) which are NOBITS have a loaded data address
>> +of 0, but a size != 0.
>
> That doesn't seem like totally unreasonable behaviour for a NOBITS
> section.  What were you expecting libelf to do in that case?
>
> ++      if (data != NULL && size != 0)
> ++        hashFunctionContextUpdateMC (&ctx, &chunk);
>
> I suppose one could argue that allocating a chunk of zero-filled memory
> of the right size and then hashing that would be a slightly better fix.
> Whether it matters in practice or not would depend on what exactly is
> going into this hash and what it's being used for.

It appears in the past it either didn't load the section at all, or the size was 
set to 0.

It's a combination of the data pointer set to NULL and the size != 0 that is 
causing the segfault.  This doesn't appear to happen outside of PPC and MIPS.

I'm going to look into identifying if the section is a NOBITS and skipping the 
whole operation if it is.

--Mark





More information about the Openembedded-core mailing list