diff options
author | David Mitchell <davem@iabyn.com> | 2015-11-16 14:40:04 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-02-03 09:18:33 +0000 |
commit | 991bab54b4e8079e992d43fe5a07d8f38ed940a3 (patch) | |
tree | 9962e51c7ff53c8d73d7280c5239293c9f0e76ee /dump.c | |
parent | 478d54a93863b3a11f93df5a66c57dfdffc49d13 (diff) | |
download | perl-991bab54b4e8079e992d43fe5a07d8f38ed940a3.tar.gz |
Perl_runops_debug(): do FREETMPS
In runops_debug() wrap the optional printing of next op, arg stack
etc with ENTER/SAVETMPS, FREETMPS/LEAVE - so that temporaries created by
the dump output are promptly freed, and thus don't alter the tmps stack.
(I'm trying to debug some tmps stack corruption, and running with -Dst
made the problem go away).
Diffstat (limited to 'dump.c')
-rw-r--r-- | dump.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2201,6 +2201,8 @@ Perl_runops_debug(pTHX) ++PL_op_exec_cnt[PL_op->op_type]; #endif if (PL_debug) { + ENTER; + SAVETMPS; if (PL_watchaddr && (*PL_watchaddr != PL_watchok)) PerlIO_printf(Perl_debug_log, "WARNING: %"UVxf" changed from %"UVxf" to %"UVxf"\n", @@ -2218,6 +2220,8 @@ Perl_runops_debug(pTHX) if (DEBUG_t_TEST_) debop(PL_op); if (DEBUG_P_TEST_) debprof(PL_op); + FREETMPS; + LEAVE; } OP_ENTRY_PROBE(OP_NAME(PL_op)); |