Re: patch full of dark magic
"Cosimo Streppone" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.sybase.devel |
|---|---|
| Message-ID | <op.vg6fmawns5ttvb@cd01> |
On Sat, 07 Aug 2010 23:12:48 +0200, David E. Wheeler <[email protected]> wrote: > On Aug 7, 2010, at 2:07 AM, Cosimo Streppone wrote: > >> My really *ignorant* wild guess is that "exit" just avoids the >> troubles bits of DESTROY() that are causing segfaults >> without actually solving the problem. > > So the issue is that it segfaults when you exit in DESTROY (which is > called during global destruction)? If so, this simple script should > segfault for you: > > package Foo; > sub DESTROY { exit; } > my $foo = bless {}, 'Foo'; I couldn't try this yet, but, I don't think this would segfault. What I *guess* happens is that the 'exit' will cause the script to immediately exit, skipping the nasty part that would otherwise segfault. > Oops. Try "unless" to "if" in this bit, please: > > fail 'Child should be inactive on DESTROY' > if $self->FETCH('Active'); Will try and let you know. -- Cosimo