This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 2009-08-04 Status


04.08.2009 16:29, Petr Machata wrote:
> My plan for the rest of this week:
>    * emit references correctly

About that.  While working on that, I've found some memory-related 
errors in dwarf_output.  pmachata/dwarf-writer has code that works (for 
single CU at least), but I had to hack around these errors in ugly ways.

The core of the problem lies in the fact, that we use iterators to hold 
DIE references.  But there are two places where these get invalidated. 
First, when children vector is constructed, it may invalidate its 
iterators.  Second, when children vector is added to _m_broods, it's 
copied over, the original is destroyed, and the iterators are left 
pointing to freed memory.

I isolated my hacks in commit 83916818d078572bc09a916b4fa6469bedf7280d.

I wonder whether you've done anything on your branch that addresses 
these problems, or if that's in plan.  I'll look myself later today 
(leaving the office now), but you will likely get around to this e-mail 
before I manage to figure out all the changes that you must have done in 
your code by now.

One way that strikes me as possible fix from the top of my head is to 
use vector index instead of the iterator, but then the de-reference 
would have to provide the vector to index.  I'll look into it in the 
evening, perhaps there's some more obvious solution.

PM

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]