Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 997de1f574e0e20ade5127d2e3eb62c44491b857
      
https://github.com/Perl/perl5/commit/997de1f574e0e20ade5127d2e3eb62c44491b857
  Author: Tony Cook <[email protected]>
  Date:   2025-12-18 (Thu, 18 Dec 2025)

  Changed paths:
    M t/op/debug.t

  Log Message:
  -----------
  add TODO test for GH #24001


  Commit: b711f998fec9ecc325d73064e0e90fbfc544a9ae
      
https://github.com/Perl/perl5/commit/b711f998fec9ecc325d73064e0e90fbfc544a9ae
  Author: Tony Cook <[email protected]>
  Date:   2025-12-18 (Thu, 18 Dec 2025)

  Changed paths:
    M gv.c
    M t/op/debug.t

  Log Message:
  -----------
  amagic_call: don't invoke DB::sub for overloads called from DB

Perl decides on whether DB::sub is called for a sub called based on
the OPpENTERSUB_DB flag in the entersub op for that call.

At compilation time ck_subr sets if PL_curstash (the current
compilation stash) is not equal to PL_dbstash (%DB::), which is fine.

When calling an overload sub amagic_call() synthesizes an entersub OP
and sets OPpENTERSUB_DB based on the same condition, but PL_curstash
isn't set to the stash of the currently executing code, but is still
set to the last stash code was compiled in (as modified by scope
restoration).

This means the flag was (perhaps nearly) always set, so the debugger
would call &DB::sub even though the overload was occurring in package
DB.

Fix this by testing against CopSTASH(PL_curcop) instead, which other
runtime stash checks also do, eg. pp_caller, doeval_compile.

Fixes #24001


  Commit: ac147137186e96998460330acb00a2a78f0a51b6
      
https://github.com/Perl/perl5/commit/ac147137186e96998460330acb00a2a78f0a51b6
  Author: Tony Cook <[email protected]>
  Date:   2025-12-18 (Thu, 18 Dec 2025)

  Changed paths:
    M pod/perldelta.pod

  Log Message:
  -----------
  perldelta for DB::sub being called from DB for overloads


Compare: https://github.com/Perl/perl5/compare/528de8c84b56...ac147137186e

To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to