Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 8fbf04a996ed5aabbe92178be8aabfc9d7f1d890
      
https://github.com/Perl/perl5/commit/8fbf04a996ed5aabbe92178be8aabfc9d7f1d890
  Author: Lukas Mai <[email protected]>
  Date:   2023-12-13 (Wed, 13 Dec 2023)

  Changed paths:
    M doop.c
    M embed.fnc
    M embed.h
    M op.c
    M os2/os2ish.h
    M perlio.c
    M pod/perldiag.pod
    M proto.h
    M t/op/vec.t
    M util.c
    M win32/win32.c

  Log Message:
  -----------
  make generic "Out of memory!" error more specific

The problem: When perl runs out of memory, it outputs a generic "Out of
memory!" error and exits. This makes it hard to track down what's
happening in a complex system, especially since the message does not
even mention perl.

This patch contains two main changes:

1. vec() in lvalue context can throw fake "Out of memory!" errors when
   it discovers that the index being assigned to is too big. Unlike real
   allocation errors, these are trappable with try {}/eval {}.

   This message has been changed to "Out of memory during vec in lvalue
   context" (and since it comes from a Perl_croak() call, it will
   generally have a script name and line number attached).

2. All other places in the source code that can emit "Out of memory!"
   errors have been changed to attach a location identifier to the
   message. For example: "Out of memory in perl:util:safesysmalloc"

   This way the error message at least mentions "perl".

Fixes #21672.


  Commit: 7a39510b73245d443bc3e362009f419cec4fe892
      
https://github.com/Perl/perl5/commit/7a39510b73245d443bc3e362009f419cec4fe892
  Author: Lukas Mai <[email protected]>
  Date:   2023-12-13 (Wed, 13 Dec 2023)

  Changed paths:
    M dist/threads/lib/threads.pm
    M dist/threads/threads.xs

  Log Message:
  -----------
  threads: make generic "Out of memory!" message more specific


  Commit: d06aed192cf5e83e669d3792a546909901fa3485
      
https://github.com/Perl/perl5/commit/d06aed192cf5e83e669d3792a546909901fa3485
  Author: Lukas Mai <[email protected]>
  Date:   2023-12-13 (Wed, 13 Dec 2023)

  Changed paths:
    M globvar.sym
    M perl.h
    M t/porting/libperl.t

  Log Message:
  -----------
  remove unused PL_no_mem symbol


Compare: https://github.com/Perl/perl5/compare/4430315acc90...d06aed192cf5

Reply via email to