From: Steve Peters Date: Sat, 8 Mar 2008 15:13:26 +0000 (+0000) Subject: Perl_croak_nocontext() is called with NULL indirectly from X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=52a5bfab8876f302d269f1bfa46eae1998f0d3ca;p=p5sagit%2Fp5-mst-13.2.git Perl_croak_nocontext() is called with NULL indirectly from some XS-based modules. p4raw-id: //depot/perl@33453 --- diff --git a/embed.fnc b/embed.fnc index 3f361c5..88e3db2 100644 --- a/embed.fnc +++ b/embed.fnc @@ -149,7 +149,7 @@ pM |PERL_CONTEXT* |create_eval_scope|U32 flags Afprd |void |croak |NULLOK const char* pat|... Apr |void |vcroak |NULLOK const char* pat|NULLOK va_list* args #if defined(PERL_IMPLICIT_CONTEXT) -Afnrp |void |croak_nocontext|NN const char* pat|... +Afnrp |void |croak_nocontext|NULLOK const char* pat|... Afnp |OP* |die_nocontext |NN const char* pat|... Afnp |void |deb_nocontext |NN const char* pat|... Afnp |char* |form_nocontext |NN const char* pat|... diff --git a/proto.h b/proto.h index c334b00..ef46817 100644 --- a/proto.h +++ b/proto.h @@ -330,10 +330,7 @@ PERL_CALLCONV void Perl_vcroak(pTHX_ const char* pat, va_list* args) #if defined(PERL_IMPLICIT_CONTEXT) PERL_CALLCONV void Perl_croak_nocontext(const char* pat, ...) __attribute__noreturn__ - __attribute__format__(__printf__,1,2) - __attribute__nonnull__(1); -#define PERL_ARGS_ASSERT_CROAK_NOCONTEXT \ - assert(pat) + __attribute__format__null_ok__(__printf__,1,2); PERL_CALLCONV OP* Perl_die_nocontext(const char* pat, ...) __attribute__format__(__printf__,1,2) diff --git a/util.c b/util.c index 82f147e..a6b5c1c 100644 --- a/util.c +++ b/util.c @@ -1432,7 +1432,6 @@ Perl_croak_nocontext(const char *pat, ...) { dTHX; va_list args; - PERL_ARGS_ASSERT_CROAK_NOCONTEXT; va_start(args, pat); vcroak(pat, &args); /* NOTREACHED */