Branch: refs/heads/haarg/db-sub-overload-fixes Home: https://github.com/Perl/perl5 Commit: a71385d4b292a5f627c989a5450a7ec2ce51ecee https://github.com/Perl/perl5/commit/a71385d4b292a5f627c989a5450a7ec2ce51ecee Author: Graham Knop <ha...@haarg.org> Date: 2025-07-29 (Tue, 29 Jul 2025)
Changed paths: M lib/perl5db.pl Log Message: ----------- perl5db: use a lexical copy of $DB::sub inside DB::sub When perl calls DB::sub in the debugger, it sets $DB::sub to the sub being called. If we trigger any other subs to get called somewhere inside DB::sub, this could cause DB::sub to be called again, overwriting the global. Perl won't call DB::sub for any sub calls within the DB namespace, but we could inadvertently trigger this via a sub override or magic, like overloads. Create a copy of the global value in a lexical to use inside the sub, to avoid it ever getting overwritten. Commit: b010c9d024787c4fb931f45ed59bc36361894db4 https://github.com/Perl/perl5/commit/b010c9d024787c4fb931f45ed59bc36361894db4 Author: Graham Knop <ha...@haarg.org> Date: 2025-07-29 (Tue, 29 Jul 2025) Changed paths: M lib/perl5db.pl Log Message: ----------- perl5db: only check sub names for non-references DB::sub can be called by perl giving it either a name (if it can be determined) or a code ref. There is special handling for AUTOLOAD subs and threads::new. This could only be happen when given the name of the sub, so there is no need to do these checks if given a reference. Additionally, a reference could be an object, which could have overloads. Those overloads could fail or otherwise complicate the normal operation of DB::sub. Add a ref check to the sub given to DB::sub to avoid these issues. Commit: 60c67f0140572ef05ddd308ba99e320a5d180fb1 https://github.com/Perl/perl5/commit/60c67f0140572ef05ddd308ba99e320a5d180fb1 Author: Graham Knop <ha...@haarg.org> Date: 2025-07-29 (Tue, 29 Jul 2025) Changed paths: M lib/perl5db.pl Log Message: ----------- bump perl5db VERSION Compare: https://github.com/Perl/perl5/compare/a71385d4b292%5E...60c67f014057 To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications