Front page | perl.perl5.porters |
Postings from April 2000
Re: [ID 20000410.007] sigsegv with perl 5.6
Thread Previous
From:
Gurusamy Sarathy
Date:
April 28, 2000 00:23
Subject:
Re: [ID 20000410.007] sigsegv with perl 5.6
Message ID:
200004280722.AAA11758@molotok.activestate.com
On Mon, 10 Apr 2000 17:00:59 EDT, Ilya Zakharevich wrote:
>Pixel writes:
>> foreach (<DATA>){
>> s/_//;
>> $o[$_] = 1;
>> }
>>
>> __DATA__
>> _a
>
>Here is the bt on the core:
>
> [1] free(0x126815, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x33b64
> [2] Perl_sv_clear(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x99b58
> [3] Perl_sv_free(0x127160, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x99e70
> [4] Perl_free_tmps(0x2, 0x125d7c, 0x121024, 0xffffffff, 0x0, 0x6860006), at 0xb5090
>=>[5] perl_run(my_perl = 0x126804), line 1331 in "perl.c"
> [6] main(0x0, 0x125480, 0xffbeedec, 0x119c00, 0x0, 0x0), at 0x2790c
>
>Note sv_clear(0).
Here's the fix for that.
Sarathy
gsar@activestate.com
-----------------------------------8<-----------------------------------
Change 5983 by gsar@auger on 2000/04/28 07:15:04
numeric conversion of non-number in change#3378 tramples on
OOK offset, causing segfaults
Affected files ...
... //depot/perl/sv.c#228 edit
Differences ...
==== //depot/perl/sv.c#228 (text) ====
Index: perl/sv.c
--- perl/sv.c.~1~ Fri Apr 28 00:15:08 2000
+++ perl/sv.c Fri Apr 28 00:15:08 2000
@@ -1483,8 +1483,8 @@
if (SvTYPE(sv) < SVt_PVIV)
sv_upgrade(sv, SVt_PVIV);
+ (void)SvIOK_on(sv);
SvIVX(sv) = 0;
- (void)SvIOK_on(sv);
if (ckWARN(WARN_NUMERIC))
not_a_number(sv);
}
@@ -1637,10 +1637,10 @@
if (SvTYPE(sv) < SVt_PVIV)
sv_upgrade(sv, SVt_PVIV);
+ (void)SvIOK_on(sv);
+ (void)SvIsUV_on(sv);
SvUVX(sv) = 0; /* We assume that 0s have the
same bitmap in IV and UV. */
- (void)SvIOK_on(sv);
- (void)SvIsUV_on(sv);
if (ckWARN(WARN_NUMERIC))
not_a_number(sv);
}
End of Patch.
Thread Previous