In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/952684692c4740b541017b64502f76660a55c57b?hp=55acc4e8965e74959640ece8bb7247be97fd4bd0>
- Log ----------------------------------------------------------------- commit 952684692c4740b541017b64502f76660a55c57b Author: David Mitchell <[email protected]> Date: Thu Feb 26 15:44:04 2015 +0000 do_op_dump(): handle unknown op_private enums Where a bitfield value in op_private doesn't correspond to any enums, do_op_dump() is supposed to display the value as an integer (with optional LABEL= prefix). Concise does this, do_op_dump was failing to do this, and instead trying to display the value symbolically as string at offset -1 in PL_op_private_labels. This wasn't important yet as no ops currently have an unspecified enum value. Spotted by Coverity. ----------------------------------------------------------------------- Summary of changes: dump.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dump.c b/dump.c index 9587668..8d2f95b 100644 --- a/dump.c +++ b/dump.c @@ -905,7 +905,10 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, const OP *o) sv_catpv(tmpsv, &PL_op_private_labels[label]); sv_catpv(tmpsv, "="); } - sv_catpv(tmpsv, &PL_op_private_labels[enum_label]); + if (enum_label == -1) + Perl_sv_catpvf(aTHX_ tmpsv, "0x%"UVxf, (UV)val); + else + sv_catpv(tmpsv, &PL_op_private_labels[enum_label]); } else { -- Perl5 Master Repository
