comparison src/if_perl.xs @ 28815:d26a95a16ce1 v8.2.4931

patch 8.2.4931: Crash with sequence of Perl commands Commit: https://github.com/vim/vim/commit/0f267621c04883de010a6379217a5f182cc03dda Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 10 13:32:24 2022 +0100 patch 8.2.4931: Crash with sequence of Perl commands Problem: Crash with sequence of Perl commands. Solution: Move PUTBACK to another line. (closes https://github.com/vim/vim/issues/10386)
author Bram Moolenaar <Bram@vim.org>
date Tue, 10 May 2022 14:45:02 +0200
parents 4c683d6c0a9d
children 89e1d67814a9
comparison
equal deleted inserted replaced
28814:748050f8ed41 28815:d26a95a16ce1
1371 PUTBACK; 1371 PUTBACK;
1372 call_method("reval", G_SCALAR); 1372 call_method("reval", G_SCALAR);
1373 SPAGAIN; 1373 SPAGAIN;
1374 SvREFCNT_dec(sv); 1374 SvREFCNT_dec(sv);
1375 sv = POPs; 1375 sv = POPs;
1376 PUTBACK;
1376 } 1377 }
1377 } 1378 }
1378 else 1379 else
1379 sv = eval_pv((char *)str, 0); 1380 sv = eval_pv((char *)str, 0);
1380 1381
1381 if (sv) { 1382 if (sv) {
1382 perl_to_vim(sv, rettv); 1383 perl_to_vim(sv, rettv);
1383 ref_map_free(); 1384 ref_map_free();
1384 err = SvPV(GvSV(PL_errgv), err_len); 1385 err = SvPV(GvSV(PL_errgv), err_len);
1385 } 1386 }
1386 PUTBACK;
1387 FREETMPS; 1387 FREETMPS;
1388 LEAVE; 1388 LEAVE;
1389 } 1389 }
1390 if (err_len) 1390 if (err_len)
1391 msg_split((char_u *)err, highlight_attr[HLF_E]); 1391 msg_split((char_u *)err, highlight_attr[HLF_E]);