Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: a73cdaecc7e625c976c1806ebdcb715321d892e3
      
https://github.com/Perl/perl5/commit/a73cdaecc7e625c976c1806ebdcb715321d892e3
  Author: Lukas Mai <lukasmai....@gmail.com>
  Date:   2024-12-30 (Mon, 30 Dec 2024)

  Changed paths:
    M builtin.c

  Log Message:
  -----------
  builtin: avoid passing bad parent argument to op_sibling_splice

op_sibling_splice() is supposed to be called with a parent/child op pair
as the first two arguments. But in `op_sibling_splice(parent, pushop, 1,
NULL)`, `parent` is not necessarily a parent of `pushop`; it can also
be a grandparent. In practice, this is harmless, however, as the parent
argument is only used when splicing the first or last sibling of an op
chain, which is never the case here (as ensured by the `argop` checks).

So just avoid `parent` altogether and pass `NULL` as the first argument
instead, which is a documented part of the op_sibling_splice() API (and
will raise a proper error if our assumptions don't hold in the future).



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

Reply via email to