[RFC] Detect loops in the solib chain

Thiago Jung Bauermann bauerman@br.ibm.com
Thu Jul 17 21:15:00 GMT 2008


On Thu, 2008-07-17 at 16:57 -0400, Daniel Jacobowitz wrote:
> A MontaVista customer had a very interestingly corrupt core file -
> there was a stray pointer in the list of loaded shared libraries.  But
> it pointed to something which looked enough like a shared library
> entry to get by, and the bad entry's l_next pointed back at the
> corrupted entry that led to it.  So around and around we went, adding
> the same two libraries to the list.  When the solib chain reached
> about 2GB, GDB was killed.

For my own education: it looks to me that this customer won the lottery
two times here (one for pointing to a link map fake entry, and the other
for it to be circular). How often can this happen in practice?

Can we expect somone else to have this problem in this millenium? :-)
-- 
[]'s
Thiago Jung Bauermann
Software Engineer
IBM Linux Technology Center



More information about the Gdb-patches mailing list