diff options
author | Tony Cook <tony@develop-help.com> | 2014-10-02 15:54:58 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2014-10-09 11:24:50 +1100 |
commit | a6d695237c4c14fa287df157c4907e01d4647641 (patch) | |
tree | 77c7361b0f9c6d75fc7b703d4cc190cb16b906d3 /intrpvar.h | |
parent | 2c2d7daa95190ae95ae6486d1734a1167ea05966 (diff) | |
download | perl-a6d695237c4c14fa287df157c4907e01d4647641.tar.gz |
[perl #122445] use magic on $DB::single etc to avoid overload issues
This prevents perl recursing infinitely when an overloaded object is
assigned to $DB::single, $DB::trace or $DB::signal
This is done by referencing their values as IVs instead of as SVs in
dbstate, and by adding magic to those variables so that assignments to
the scalars update the PL_DBcontrol array.
Diffstat (limited to 'intrpvar.h')
-rw-r--r-- | intrpvar.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intrpvar.h b/intrpvar.h index ee1d3ed523..a5248a8bcc 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -393,6 +393,8 @@ PERLVAR(I, DBtrace, SV *) /* $DB::trace */ PERLVAR(I, DBsignal, SV *) /* $DB::signal */ PERLVAR(I, dbargs, AV *) /* args to call listed by caller function */ +PERLVARA(I, DBcontrol, DBVARMG_COUNT, IV) /* IV versions of $DB::single, trace, signal */ + /* symbol tables */ PERLVAR(I, debstash, HV *) /* symbol table for perldb package */ PERLVAR(I, globalstash, HV *) /* global keyword overrides imported here */ |