summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-12-01 15:40:11 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-12-01 15:40:11 +0000
commite271e56d5700d8b78a1a9d5ecb4471f81deffa6c (patch)
treeb2e3047392f13e04f8dec1ff4247c651b1dd3f42
parent50627f8079af8414075aa4b4eec91a3bb1aa86b8 (diff)
downloadperl-e271e56d5700d8b78a1a9d5ecb4471f81deffa6c.tar.gz
Always define PL_memory_wrap, and use it for the new sprintf checks
p4raw-id: //depot/perl@26239
-rw-r--r--makedef.pl6
-rw-r--r--perl.h2
-rw-r--r--sv.c4
3 files changed, 0 insertions, 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') {