You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments