develooper Front page | perl.perl5.porters | Postings from April 2003

Re: [perl #21347] segfault in UNIVERSAL::AUTOLOAD

Thread Previous | Thread Next
From:
Enache Adrian
Date:
April 1, 2003 20:53
Subject:
Re: [perl #21347] segfault in UNIVERSAL::AUTOLOAD
Message ID:
20030402045227.GA1023@ratsnest.hole
On Wed, Apr 02, 2003 at 05:02:42AM +0300, I wrote:
> kind of final cleanup crashes, etc. The first test there is
> for another bug, see
>     http://nntp.perl.org/group/perl.perl5.porters/73117

That test shook another buglet, this time in pp_warn. Only
when running 'make test' ( not harness, or by hand ) that
first test causes a core dump. That's because the macro
ERRGV dereferences PL_errgv, which in some phase of the
final cleanup (?) happens to be zero. This little kludge
also fixes it.

Regards
Adi

----------------------------------------------------------------
diff -u -r1.1.1.1 pp_sys.c
--- pp_sys.c	1 Apr 2003 21:12:03 -0000	1.1.1.1
+++ pp_sys.c	2 Apr 2003 04:37:12 -0000
@@ -422,7 +422,7 @@
 	tmpsv = TOPs;
     }
     tmps = SvPV(tmpsv, len);
-    if (!tmps || !len) {
+    if ((!tmps || !len) && PL_errgv) {
   	SV *error = ERRSV;
 	(void)SvUPGRADE(error, SVt_PV);
 	if (SvPOK(error) && SvCUR(error))

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About