public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Thilo Schulz <thilo@tjps.eu>
To: elfutils-devel@lists.fedorahosted.org
Subject: Re: [PATCH] Fix section corruption bug
Date: Sat, 14 Jun 2014 03:23:29 +0200	[thread overview]
Message-ID: <201406140323.29523.thilo@tjps.eu> (raw)
In-Reply-To: 1402576252.3940.95.camel@bordewijk.wildebeest.org

[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

On Thursday 12 June 2014 14:30:52 Mark Wielaard wrote:
> Thanks. It think that shows the second bug you describe.

First bug. My testcase first uses elf_strptr() to get the strings for the 
symbols, and that func internally calls elf_rawdata() thus triggering the first 
bug described.

> Still scratching my head a little how to resolve both issues properly.

Hmm.. I didn't do any debugging on the second bug reported, but it seems to me 
that once a section was marked dirty, outputting to a new elf causes it to 
only consider data explicitly added to the lib internal memory representation 
of the elf.
It _did_ write out the data I added via elf_newdata(), and entered the 
appropriate offsets into the header file, but completely omitted copying of the 
original data.

These issues can all be worked around with by explicitly calling 
elf_getdata().

Still, I'm a bit baffled that a bug like this could exist for so long in .. well 
I guess these are kind of core developer utils, right?
Or maybe I'm doing some really sick stuff noone else dreamt up yet ;)

-- 
Best regards,
Thilo Schulz

             reply	other threads:[~2014-06-14  1:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-14  1:23 Thilo Schulz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-03-11 12:46 Mark Wielaard
2014-06-12 12:30 Mark Wielaard
2014-06-10 13:31 Thilo Schulz
2014-06-10  9:48 Mark Wielaard
2014-06-09 19:05 Thilo Schulz

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=201406140323.29523.thilo@tjps.eu \
    --to=thilo@tjps.eu \
    --cc=elfutils-devel@lists.fedorahosted.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).