diff options
author | Tony Cook <tony@develop-help.com> | 2021-10-21 14:16:54 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2021-11-15 11:35:42 +1100 |
commit | 9c913148860b0e83e6149d37e86cdb29663ee812 (patch) | |
tree | 7f710ef653664ac0a0bb48561554f5a45e8ca8ce /proto.h | |
parent | 9bce496f83cb607054f21c015c5f377c24c86bfd (diff) | |
download | perl-9c913148860b0e83e6149d37e86cdb29663ee812.tar.gz |
Add CopFILEAVn() and use it when cleaning up COP pointers
On threaded builds CopFILEAV() calls gv_fetchfile(), which always
created the *{"::_<filenamehere"} glob, so the attempted clean up
here could recreate the glob, even if it has already been removed
when cleaning up a string eval.
To avoid this, add CopFILEAVn() that never creates the glob,
nor the AV so that the clean up never adds new objects.
This change makes the check for PL_phase unnecessary, but that check
is much cheaper than the call for gv_fetchfile_flags() that the
macro hides, so retain the check.
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -6824,6 +6824,11 @@ PERL_CALLCONV CLONE_PARAMS * Perl_clone_params_new(PerlInterpreter *const from, #define PERL_ARGS_ASSERT_CLONE_PARAMS_NEW \ assert(from); assert(to) +#ifndef PERL_NO_INLINE_FUNCTIONS +PERL_STATIC_INLINE AV* Perl_cop_file_avn(pTHX_ const COP *cop); +#define PERL_ARGS_ASSERT_COP_FILE_AVN \ + assert(cop) +#endif PERL_CALLCONV PERL_CONTEXT* Perl_cx_dup(pTHX_ PERL_CONTEXT* cx, I32 ix, I32 max, CLONE_PARAMS* param) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_CX_DUP \ |