On Tue, May 28, 2013 at 6:19 PM, Ryan Johnson <ryan.john...@cs.utoronto.ca> wrote: > > That last point makes me really wonder why we bother grabbing the mutex > during unwind at all... at the very least, it would seem profitable to > verify the object header cache at throw time---perhaps using the nadds/nsubs > trick---and refresh it with a call to dl_iterate_phdr if need be, then do > the rest of unwind lock-free, ignoring deranged users who dlclose live code > [2].
It's not that simple, as the cache is simply mapped in from the object. So we need to ensure not only that the cache is valid when we start to read it, but that it remains valid while we are reading it. It's hard to see how to do that without some sort of lock. Ian