From: Nicholas Clark Date: Sat, 15 Apr 2006 20:54:44 +0000 (+0000) Subject: Update the assertion to a croak "Out of range special SV number" X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=578e3dbccd1bcbfde2fd9bf4c78cf0432beb8492;p=p5sagit%2Fp5-mst-13.2.git Update the assertion to a croak "Out of range special SV number" to give ByteLoader more meaningful failure diagnostics. p4raw-id: //depot/perl@27822 --- diff --git a/ext/ByteLoader/bytecode.h b/ext/ByteLoader/bytecode.h index 1d06b08..3e6f9d9 100644 --- a/ext/ByteLoader/bytecode.h +++ b/ext/ByteLoader/bytecode.h @@ -91,9 +91,11 @@ typedef char *pvindex; arg = arg ? savepv(arg) : arg; \ } STMT_END -#define BSET_ldspecsv(sv, arg) STMT_START { \ - assert(arg < sizeof(specialsv_list) / sizeof(specialsv_list[0])); \ - sv = specialsv_list[arg]; \ +#define BSET_ldspecsv(sv, arg) STMT_START { \ + if(arg >= sizeof(specialsv_list) / sizeof(specialsv_list[0])) { \ + Perl_croak(aTHX_ "Out of range special SV number %d", arg); \ + } \ + sv = specialsv_list[arg]; \ } STMT_END #define BSET_ldspecsvx(sv, arg) STMT_START { \