summaryrefslogtreecommitdiff
path: root/t/comp
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2017-08-24 14:38:41 +1000
committerTony Cook <tony@develop-help.com>2017-08-31 09:11:05 +1000
commit1141a2c757171575dd43caa4b731ca4f491c2bcf (patch)
tree197e61008e457a148a42907d81e38a563706d572 /t/comp
parent5956eec7c8ad0c228d38f744371ebafd305d8088 (diff)
downloadperl-1141a2c757171575dd43caa4b731ca4f491c2bcf.tar.gz
(perl #131949) adjust s in case peekspace() moves the line string
Diffstat (limited to 't/comp')
-rw-r--r--t/comp/parser_run.t12
1 files changed, 11 insertions, 1 deletions
diff --git a/t/comp/parser_run.t b/t/comp/parser_run.t
index a2cc27d3fb..af35758bee 100644
--- a/t/comp/parser_run.t
+++ b/t/comp/parser_run.t
@@ -10,7 +10,7 @@ BEGIN {
}
require './test.pl';
-plan(3);
+plan(4);
# [perl #130814] can reallocate lineptr while looking ahead for
# "Missing $ on loop variable" diagnostic.
@@ -39,5 +39,15 @@ syntax error at - line 1, at EOF
Execution of - aborted due to compilation errors.
EXPECTED
+SKIP:
+{
+ # [perl #131949] use after free
+ # detected by ASAN
+ # Win32 cmd.exe can't handle newlines well
+ skip("Need POSIXish", 1) if $^O eq "MSWin32";
+ my $out = runperl(prog => "\@{ 0\n\n}", stderr => 1, non_portable => 1);
+ is($out, "", "check for ASAN use after free");
+}
+
__END__
# ex: set ts=8 sts=4 sw=4 et: