libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libunwind] sos_alloc()


From: Todd L Miller
Subject: [libunwind] sos_alloc()
Date: Thu, 25 Mar 2004 17:10:35 -0600 (CST)

        sos_alloc() is abort()ing on me as I'm using the single-step
method to determine the correctness of the unwind information.  (I've
already come across what's probably an unresolveable issue; more below.)
I poked around in the libunwind source, and there doesn't seem to be a
corresponding sos_free().  Is this intentional?  I imagine the problem is
related to often I'm creating and destroying address spaces and unwind
contexts.  (While I am doing it far more frequently than should be
necessary for historical reasons, I don't currently see a way around
re-creating the address space every time I start a stack walk*, because I
may be doing it in a different remote process than the last one.)

        The problem I mentioned above is the following: if I overwrite
part of the prologue with a jump (common), the prologue will have
correctly executed by the time execution returns to the function, but the
unwind information will expect (parts of it) to be done much sooner, that
is, by the jump instruction itself.  (I'm overwriting the bundle with a
nop and a long branch.)  I thought about inserting dynamic unwind
information for this bundle (which would say, in effect, that nothing
interesting was going on) to correct this issue.  However, would that
screw up unwinding through the rest of the function, because the static
information about the prologue actions that were done (by the time
normal execution resumes) had been overridden?

- Todd Miller

* I could track process ids, but I could potentially switch between the
two every time.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]