This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Excessive calls to iterate_phdr during exception handling


On Mon, May 27, 2013 at 06:20:21PM -0400, Ryan Johnson wrote:
> I'm not sure whether this is an oversight, a known problem that's
> hard to fix, or a feature (e.g. somehow required for reliable
> unwinding). I suspect the former, because _Unwind_Find_FDE tries a
> call to _Unwind_Find_registered_FDE before falling back to
> dl_iterate_phdr, but the former never succeeds in my trace
> (iterate_phdr is always called).

Your suspicion is unfounded.  The locking is required to support
dlopen (or at least, you need some sort of thread synchronisation
here).  _Unwind_Find_registered_FDE is to support an older method of
finding FDEs.  Newer executables and shared libraries on linux will
use PT_GNU_EH_FRAME, so don't expect _Unwind_Find_registered_FDE
to do anything except waste time!  google eh_frame_hdr for more info.

C++ and threading is a minefield.

-- 
Alan Modra
Australia Development Lab, IBM


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