diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-09-03 16:47:15 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-09-04 11:08:38 +0200 |
commit | 7bbbc3c08a8830fe5d44ce7a6056cfba6fb67c22 (patch) | |
tree | 17d3ee1a96dba24e2464607b7075ab64f9701717 /embed.fnc | |
parent | 83519873101c5088b6e33e85da400d6f575c0ceb (diff) | |
download | perl-7bbbc3c08a8830fe5d44ce7a6056cfba6fb67c22.tar.gz |
Perl_magic_setdbline() should clear and set read-only OP slabs.
The debugger implements breakpoints by setting/clearing OPf_SPECIAL on
OP_DBSTATE ops. This means that it is writing to the optree at runtime,
and it falls foul of the enforced read-only OP slabs when debugging with
-DPERL_DEBUG_READONLY_OPS
Avoid this by removing static from Slab_to_rw(), and using it and Slab_to_ro()
in Perl_magic_setdbline() to temporarily make the slab re-write whilst
changing the breakpoint flag.
With this all tests pass with -DPERL_DEBUG_READONLY_OPS (on this system)
Diffstat (limited to 'embed.fnc')
-rw-r--r-- | embed.fnc | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1797,14 +1797,12 @@ Xp |void |Slab_Free |NN void *op #if defined(PERL_DEBUG_READONLY_OPS) # if defined(PERL_CORE) px |void |Slab_to_ro |NN OPSLAB *slab +px |void |Slab_to_rw |NN OPSLAB *const slab # endif : Used in OpREFCNT_inc() in sv.c poxM |OP * |op_refcnt_inc |NULLOK OP *o : FIXME - can be static. poxM |PADOFFSET |op_refcnt_dec |NN OP *o -# if defined(PERL_IN_OP_C) -s |void |Slab_to_rw |NN OPSLAB *const slab -# endif #endif #if defined(PERL_IN_PERL_C) |