From: David Mitchell Date: Fri, 22 Jan 2010 12:57:27 +0000 (+0000) Subject: fix SEGV in /\N{...}/ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2628941b2d252f43f51dd0bcf09e95facb046886;p=p5sagit%2Fp5-mst-13.2.git fix SEGV in /\N{...}/ A simple program like the following could coredump: use charnames ':full'; /\N{LATIN SMALL LETTER E}/; The moral being, make sure sp is synced on return from call_sv() *before* using the stack! (Was a regression since 5.10) --- diff --git a/regcomp.c b/regcomp.c index 337f0c4..10f97b9 100644 --- a/regcomp.c +++ b/regcomp.c @@ -6734,13 +6734,13 @@ S_reg_namedseq(pTHX_ RExC_state_t *pRExC_state, UV *valuep, I32 *flagp) PUTBACK ; count= call_sv(cv, G_SCALAR); + SPAGAIN ; if (count == 1) { /* XXXX is this right? dmq */ sv_str = POPs; SvREFCNT_inc_simple_void(sv_str); } - SPAGAIN ; PUTBACK ; FREETMPS ; LEAVE ;