develooper Front page | perl.perl5.changes | Postings from November 2021

[Perl/perl5] 1e2387: allow DebugWrap to take the test code as anargument

From:
Tony Cook via perl5-changes
Date:
November 15, 2021 00:36
Subject:
[Perl/perl5] 1e2387: allow DebugWrap to take the test code as anargument
Message ID:
Perl/perl5/push/refs/heads/blead/a85e04-a88993@github.com
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 1e2387b573582736d884e8693e39e7ab70e6d822
      https://github.com/Perl/perl5/commit/1e2387b573582736d884e8693e39e7ab70e6d822
  Author: Tony Cook <tony@develop-help.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M lib/perl5db.t

  Log Message:
  -----------
  allow DebugWrap to take the test code as an argument

This increases the locality of the code being tested to the test and
avoids littering the tree with little test files.


  Commit: 0617c8b316aa29eb99f87ffa2c78b5818f13ebde
      https://github.com/Perl/perl5/commit/0617c8b316aa29eb99f87ffa2c78b5818f13ebde
  Author: Tony Cook <tony@develop-help.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M lib/perl5db.t

  Log Message:
  -----------
  document the DebugWrap class used internally to perl5db.t

saves me having to find the difference between "output" and
"contents" each time I write a debugger test


  Commit: 0cdbe2162863542f45a5faa22e46c1aa76c029cb
      https://github.com/Perl/perl5/commit/0cdbe2162863542f45a5faa22e46c1aa76c029cb
  Author: Tony Cook <tony@develop-help.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M lib/perl5db.t
    M op.c

  Log Message:
  -----------
  remove cop addressed from saved lines when the cop is freed

This could cause a bad read and write when the debugger tried to
set a breakpoint on the line.

Fixed #19198


  Commit: 9bce496f83cb607054f21c015c5f377c24c86bfd
      https://github.com/Perl/perl5/commit/9bce496f83cb607054f21c015c5f377c24c86bfd
  Author: Tony Cook <tony@develop-help.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M op.c

  Log Message:
  -----------
  don't try to clean up the COP pointer during global destruction

At this point there should be no further debugging code trying to
use the COP pointer.

On threaded builds the call to CopFILEAV() could cause a segmentation
fault, since during late destruction gv_fetchfile() could return
NULL, which the threaded version of CopFILEAV() would blindly call
GvAV() on.


  Commit: 9c913148860b0e83e6149d37e86cdb29663ee812
      https://github.com/Perl/perl5/commit/9c913148860b0e83e6149d37e86cdb29663ee812
  Author: Tony Cook <tony@develop-help.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M cop.h
    M embed.fnc
    M embed.h
    M gv.c
    M gv.h
    M inline.h
    M op.c
    M proto.h

  Log Message:
  -----------
  Add CopFILEAVn() and use it when cleaning up COP pointers

On threaded builds CopFILEAV() calls gv_fetchfile(), which always
created the *{"::_<filenamehere"} glob, so the attempted clean up
here could recreate the glob, even if it has already been removed
when cleaning up a string eval.

To avoid this, add CopFILEAVn() that never creates the glob,
nor the AV so that the clean up never adds new objects.

This change makes the check for PL_phase unnecessary, but that check
is much cheaper than the call for gv_fetchfile_flags() that the
macro hides, so retain the check.


  Commit: a889938046e1b9f7f2a4e0fa84eb5ff6e358854d
      https://github.com/Perl/perl5/commit/a889938046e1b9f7f2a4e0fa84eb5ff6e358854d
  Author: Tony Cook <tony@develop-help.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M cop.h

  Log Message:
  -----------
  correct the comment distinguishing between threaded/unthreaded cop macros


Compare: https://github.com/Perl/perl5/compare/a85e04e22812...a889938046e1



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About