On Wed, May 28, 2003 at 05:41:49PM +0100, Ben wrote: > What circumstances are there under which eval {}; will not trap a program exit ? > > I assume a naughty XS module segfaulting will do for it - but are there any > others?
The XS module may not directly segfault but rather leave garbage around that causes segfaults when they are cleared up. perl -e 'eval {use Clone qw(clone); $a={}; undef $a; $c=clone $a;print "cloned\n";}' clone does not directly appear to cause the segfault but the clean up of $c going out of scope causes the segfault. see :- http://rt.cpan.org/NoAuth/Bug.html?id=2252 for a fuller explaination. Hope that helped some Paddy