summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2016-08-22 13:56:26 +1000
committerTony Cook <tony@develop-help.com>2016-09-07 10:19:21 +1000
commit382450a68fa9cdd5206e8c46383bd92e63aeb392 (patch)
tree9357764df5135bca9c79d28ee250e06a13df0e39 /t
parent5b549d1d2267bb0d85424c02f9b4c895ebbcf404 (diff)
downloadperl-382450a68fa9cdd5206e8c46383bd92e63aeb392.tar.gz
(perl #128988) preserve PL_oldoldbufptr is preserved in scan_heredoc()
In some cases this is used in building error messages.
Diffstat (limited to 't')
-rw-r--r--t/op/heredoc.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/op/heredoc.t b/t/op/heredoc.t
index 90ba6060e2..f47f7ce7cc 100644
--- a/t/op/heredoc.t
+++ b/t/op/heredoc.t
@@ -7,7 +7,7 @@ BEGIN {
}
use strict;
-plan(tests => 41);
+plan(tests => 42);
# heredoc without newline (#65838)
@@ -99,6 +99,15 @@ HEREDOC
"don't use an invalid oldoldbufptr"
);
+ # also read freed memory, but got an invalid oldoldbufptr in a different way
+ fresh_perl_like(
+ qq(<<\n\$ \n),
+ # valgrind and asan reports an error between these two lines
+ qr/^Use of bare << to mean <<"" is deprecated at - line 1\.\s+Final \$/,
+ {},
+ "don't use an invalid oldoldbufptr (some more)"
+ );
+
# [perl #125540] this asserted or crashed
fresh_perl_like(
q(map d$#<<<<),