In perl.git, the branch smoke-me/jkeenan/test-smoke-testing has been updated
<http://perl5.git.perl.org/perl.git/commitdiff/241b13bcc494214eabd3a046265d224b00d64499?hp=9152f89a96f986a9740f6bdc70ba58c5e8675ff8> discards 9152f89a96f986a9740f6bdc70ba58c5e8675ff8 (commit) discards e03666326636ebb6ed685353f9dd35f548855461 (commit) - Log ----------------------------------------------------------------- commit 241b13bcc494214eabd3a046265d224b00d64499 Author: James E Keenan <[email protected]> Date: Mon Jan 30 19:04:40 2017 -0500 Trigger new SHA. M README commit 9d5c9749dd4183606734558111cd0105169f991d Author: James E Keenan <[email protected]> Date: Sun Jan 29 08:16:54 2017 -0500 Trigger new SHA. M README commit 120f58c33c146dd97dec2def0d36d9096fa2e160 Author: James E Keenan <[email protected]> Date: Sat Jan 28 17:36:33 2017 -0500 Whitespace only. M README ----------------------------------------------------------------------- Summary of changes: README | 1 + embed.fnc | 2 +- embed.h | 2 +- proto.h | 4 ++-- regcomp.c | 3 ++- t/lib/warnings/toke | 12 ++++++++++++ t/op/signatures.t | 6 ++++++ toke.c | 21 +++++++++------------ 8 files changed, 34 insertions(+), 17 deletions(-) diff --git a/README b/README index f7406543dd..4dffd306c4 100644 --- a/README +++ b/README @@ -129,3 +129,4 @@ my intent, feel free to contact me. Of course, the Artistic License spells all this out for your protection, so you may prefer to use that. 20170129 +20170130 diff --git a/embed.fnc b/embed.fnc index ae7e8d75a4..d84f31353b 100644 --- a/embed.fnc +++ b/embed.fnc @@ -2645,7 +2645,7 @@ sR |SV* |get_and_check_backslash_N_name|NN const char* s \ |NN const char* const e sR |char* |scan_formline |NN char *s sR |char* |scan_heredoc |NN char *s -s |char* |scan_ident |NN char *s|NN char *dest \ +s |char* |scan_ident |NN char *s|NN const char *send|NN char *dest \ |STRLEN destlen|I32 ck_uni sR |char* |scan_inputsymbol|NN char *start sR |char* |scan_pat |NN char *start|I32 type diff --git a/embed.h b/embed.h index 2233a35e80..72950ae44b 100644 --- a/embed.h +++ b/embed.h @@ -1815,7 +1815,7 @@ #define scan_const(a) S_scan_const(aTHX_ a) #define scan_formline(a) S_scan_formline(aTHX_ a) #define scan_heredoc(a) S_scan_heredoc(aTHX_ a) -#define scan_ident(a,b,c,d) S_scan_ident(aTHX_ a,b,c,d) +#define scan_ident(a,b,c,d,e) S_scan_ident(aTHX_ a,b,c,d,e) #define scan_inputsymbol(a) S_scan_inputsymbol(aTHX_ a) #define scan_pat(a,b) S_scan_pat(aTHX_ a,b) #define scan_str(a,b,c,d,e) S_scan_str(aTHX_ a,b,c,d,e) diff --git a/proto.h b/proto.h index 7ec784981a..46556eec17 100644 --- a/proto.h +++ b/proto.h @@ -5552,9 +5552,9 @@ STATIC char* S_scan_heredoc(pTHX_ char *s) #define PERL_ARGS_ASSERT_SCAN_HEREDOC \ assert(s) -STATIC char* S_scan_ident(pTHX_ char *s, char *dest, STRLEN destlen, I32 ck_uni); +STATIC char* S_scan_ident(pTHX_ char *s, const char *send, char *dest, STRLEN destlen, I32 ck_uni); #define PERL_ARGS_ASSERT_SCAN_IDENT \ - assert(s); assert(dest) + assert(s); assert(send); assert(dest) STATIC char* S_scan_inputsymbol(pTHX_ char *start) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_SCAN_INPUTSYMBOL \ diff --git a/regcomp.c b/regcomp.c index 19ed866f84..0a315cbdbc 100644 --- a/regcomp.c +++ b/regcomp.c @@ -18508,7 +18508,8 @@ S_reg2Lanode(pTHX_ RExC_state_t *pRExC_state, const U8 op, const U32 arg1, const * set up NEXT_OFF() of the inserted node if needed. Something like this: * * reginsert(pRExC, OPFAIL, orig_emit, depth+1); -* NEXT_OFF(orig_emit)= regarglen[OPFAIL] + NODE_STEP_REGNODE; +* if (PASS2) +* NEXT_OFF(orig_emit) = regarglen[OPFAIL] + NODE_STEP_REGNODE; * */ STATIC void diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke index 1f971e88d2..2774f08dd1 100644 --- a/t/lib/warnings/toke +++ b/t/lib/warnings/toke @@ -1637,3 +1637,15 @@ EXPECT OPTION fatal Malformed UTF-8 character: \xc3\x20 (unexpected non-continuation byte 0x20, immediately after start byte 0xc3; need 2 bytes, got 1) in eval "string" at - line 11. Malformed UTF-8 character (fatal) at - line 11. +######## +# NAME [perl $130666] Assertion failure +no warnings "uninitialized"; +BEGIN{$^H=-1};my $l; s$0[$l] +EXPECT +######## +# NAME [perl $129036] Assertion failure +BEGIN{$0="";$^H=hex join""=>A00000}p? +EXPECT +OPTION fatal +syntax error at - line 1, at EOF +Execution of - aborted due to compilation errors. diff --git a/t/op/signatures.t b/t/op/signatures.t index 0e53bf05d2..aa785bf65c 100644 --- a/t/op/signatures.t +++ b/t/op/signatures.t @@ -1463,6 +1463,12 @@ is scalar(t145()), undef; "masking warning"; } +# RT #130661 a char >= 0x80 in a signature when a sigil was expected +# was triggering an assertion + +eval "sub (\x80"; +like $@, qr/A signature parameter must start with/, "RT #130661"; + use File::Spec::Functions; diff --git a/toke.c b/toke.c index 864c5269c3..7dcdd5afa1 100644 --- a/toke.c +++ b/toke.c @@ -4166,10 +4166,7 @@ S_intuit_more(pTHX_ char *s) weight -= seen[un_char] * 10; if (isWORDCHAR_lazy_if_safe(s+1, PL_bufend, UTF)) { int len; - char *tmp = PL_bufend; - PL_bufend = (char*)send; - scan_ident(s, tmpbuf, sizeof tmpbuf, FALSE); - PL_bufend = tmp; + scan_ident(s, send, tmpbuf, sizeof tmpbuf, FALSE); len = (int)strlen(tmpbuf); if (len > 1 && gv_fetchpvn_flags(tmpbuf, len, UTF ? SVf_UTF8 : 0, SVt_PV)) @@ -5040,7 +5037,7 @@ Perl_yylex(pTHX) * as a var; e.g. ($, ...) would be seen as the var '$,' */ - char sigil; + U8 sigil; s = skipspace(s); sigil = *s++; @@ -5693,7 +5690,7 @@ Perl_yylex(pTHX) case '*': if (PL_expect == XPOSTDEREF) POSTDEREF('*'); if (PL_expect != XOPERATOR) { - s = scan_ident(s, PL_tokenbuf, sizeof PL_tokenbuf, TRUE); + s = scan_ident(s, PL_bufend, PL_tokenbuf, sizeof PL_tokenbuf, TRUE); PL_expect = XOPERATOR; force_ident(PL_tokenbuf, '*'); if (!*PL_tokenbuf) @@ -5736,7 +5733,7 @@ Perl_yylex(pTHX) } else if (PL_expect == XPOSTDEREF) POSTDEREF('%'); PL_tokenbuf[0] = '%'; - s = scan_ident(s, PL_tokenbuf + 1, + s = scan_ident(s, PL_bufend, PL_tokenbuf + 1, sizeof PL_tokenbuf - 1, FALSE); pl_yylval.ival = 0; if (!PL_tokenbuf[1]) { @@ -6283,7 +6280,7 @@ Perl_yylex(pTHX) } PL_tokenbuf[0] = '&'; - s = scan_ident(s - 1, PL_tokenbuf + 1, + s = scan_ident(s - 1, PL_bufend, PL_tokenbuf + 1, sizeof PL_tokenbuf - 1, TRUE); pl_yylval.ival = (OPpENTERSUB_AMPER<<8); if (PL_tokenbuf[1]) { @@ -6546,7 +6543,7 @@ Perl_yylex(pTHX) || strchr("{$:+-@", s[2]))) { PL_tokenbuf[0] = '@'; - s = scan_ident(s + 1, PL_tokenbuf + 1, + s = scan_ident(s + 1, PL_bufend, PL_tokenbuf + 1, sizeof PL_tokenbuf - 1, FALSE); if (PL_expect == XOPERATOR) { d = s; @@ -6564,7 +6561,7 @@ Perl_yylex(pTHX) } PL_tokenbuf[0] = '$'; - s = scan_ident(s, PL_tokenbuf + 1, + s = scan_ident(s, PL_bufend, PL_tokenbuf + 1, sizeof PL_tokenbuf - 1, FALSE); if (PL_expect == XOPERATOR) { d = s; @@ -6700,7 +6697,7 @@ Perl_yylex(pTHX) if (PL_expect == XPOSTDEREF) POSTDEREF('@'); PL_tokenbuf[0] = '@'; - s = scan_ident(s, PL_tokenbuf + 1, sizeof PL_tokenbuf - 1, FALSE); + s = scan_ident(s, PL_bufend, PL_tokenbuf + 1, sizeof PL_tokenbuf - 1, FALSE); if (PL_expect == XOPERATOR) { d = s; if (PL_bufptr > s) { @@ -9260,7 +9257,7 @@ S_scan_word(pTHX_ char *s, char *dest, STRLEN destlen, int allow_package, STRLEN && LIKELY((U8) *(s) != LATIN1_TO_NATIVE(0xAD))))) STATIC char * -S_scan_ident(pTHX_ char *s, char *dest, STRLEN destlen, I32 ck_uni) +S_scan_ident(pTHX_ char *s, const char *send, char *dest, STRLEN destlen, I32 ck_uni) { I32 herelines = PL_parser->herelines; SSize_t bracket = -1; -- Perl5 Master Repository
