In particular, don't handle OPs that are created as part of load_module().
This solves RT #47866.
t/40-threads.t
t/41-memory.t
t/42-stress.t
+t/80-regressions.t
t/91-pod.t
t/92-pod-coverage.t
t/95-portability-files.t
STATIC SV *indirect_hint(pTHX) {
#define indirect_hint() indirect_hint(aTHX)
SV *hint;
+
+ if (IN_PERL_RUNTIME)
+ return NULL;
+
#if I_HAS_PERL(5, 9, 5)
hint = Perl_refcounted_he_fetch(aTHX_ PL_curcop->cop_hints_hash,
NULL,
0,
indirect_hash);
#else
- SV **val = hv_fetch(GvHV(PL_hintgv), __PACKAGE__, __PACKAGE_LEN__,
+ {
+ SV **val = hv_fetch(GvHV(PL_hintgv), __PACKAGE__, __PACKAGE_LEN__,
indirect_hash);
- if (!val)
- return 0;
- hint = *val;
+ if (!val)
+ return 0;
+ hint = *val;
+ }
#endif
return indirect_detag(hint);
}
--- /dev/null
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+
+sub run_perl {
+ my $code = shift;
+
+ local %ENV;
+ system { $^X } $^X, '-T', map("-I$_", @INC), '-e', $code;
+}
+
+{
+ my $status = run_perl 'no indirect; print "a\x{100}b" =~ /\A[\x00-\x7f]*\z/;';
+ is $status, 0, 'RT #47866';
+}