From e271e56d5700d8b78a1a9d5ecb4471f81deffa6c Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 1 Dec 2005 15:40:11 +0000 Subject: Always define PL_memory_wrap, and use it for the new sprintf checks p4raw-id: //depot/perl@26239 --- makedef.pl | 6 ------ perl.h | 2 -- sv.c | 4 ---- 3 files changed, 12 deletions(-) diff --git a/makedef.pl b/makedef.pl index 9737605a2f..a0bcf7d354 100644 --- a/makedef.pl +++ b/makedef.pl @@ -660,12 +660,6 @@ else { )]; } -unless ($define{'PERL_MALLOC_WRAP'}) { - skip_symbols [qw( - PL_memory_wrap - )]; -} - if ($define{'PERL_USE_SAFE_PUTENV'}) { skip_symbols [qw( PL_use_safe_putenv diff --git a/perl.h b/perl.h index 39e4f6ee84..dd05dd1133 100644 --- a/perl.h +++ b/perl.h @@ -3800,10 +3800,8 @@ EXTCONST char PL_no_myglob[] INIT("\"my\" variable %s can't be in a package"); EXTCONST char PL_no_localize_ref[] INIT("Can't localize through a reference"); -#ifdef PERL_MALLOC_WRAP EXTCONST char PL_memory_wrap[] INIT("panic: memory wrap"); -#endif EXTCONST char PL_uuemap[65] INIT("`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"); diff --git a/sv.c b/sv.c index 0b85abed09..35faa6aaa9 100644 --- a/sv.c +++ b/sv.c @@ -8891,10 +8891,8 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV /* calculate width before utf8_upgrade changes it */ have = esignlen + zeros + elen; -#ifdef PERL_MALLOC_WRAP if (have < zeros) Perl_croak_nocontext(PL_memory_wrap); -#endif if (is_utf8 != has_utf8) { if (is_utf8) { @@ -8915,10 +8913,8 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV need = (have > width ? have : width); gap = need - have; -#ifdef PERL_MALLOC_WRAP if (need >= (((STRLEN)~0) - SvCUR(sv) - dotstrlen - 1)) Perl_croak_nocontext(PL_memory_wrap); -#endif SvGROW(sv, SvCUR(sv) + need + dotstrlen + 1); p = SvEND(sv); if (esignlen && fill == '0') { -- cgit v1.2.1