From: Mark Hatle <mark.hatle@windriver.com>
To: Phil Blundell <pb@pbcl.net>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/2 RFC] rpm: Add workaround for debugedit-segv
Date: Mon, 25 Mar 2013 12:10:29 -0500 [thread overview]
Message-ID: <51508505.5080706@windriver.com> (raw)
In-Reply-To: <1364230955.25692.138.camel@phil-desktop.brightsign>
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
next prev parent reply other threads:[~2013-03-25 17:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-25 17:19 [PATCH 0/2 RFC] workaround for debugedit segv Mark Hatle
2013-03-25 17:19 ` [PATCH 1/2 RFC] rpm: Add workaround for debugedit-segv Mark Hatle
2013-03-25 17:02 ` Phil Blundell
2013-03-25 17:10 ` Mark Hatle [this message]
2013-03-25 17:45 ` Phil Blundell
2013-03-25 19:32 ` Mark Hatle
2013-03-25 21:47 ` Mark Hatle
2013-03-26 10:38 ` Phil Blundell
2013-03-26 12:20 ` Mark Hatle
2013-03-25 17:19 ` [PATCH 2/2 RFC] package.bbclass: Trigger a bb.error if split/strip fails Mark Hatle
2013-03-25 17:47 ` [PATCH 0/2 RFC] workaround for debugedit segv Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51508505.5080706@windriver.com \
--to=mark.hatle@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=pb@pbcl.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox