Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: c0588928a3ddf0a25cdd6b8ba2679ad29a20fcd9
      
https://github.com/Perl/perl5/commit/c0588928a3ddf0a25cdd6b8ba2679ad29a20fcd9
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M MANIFEST
    M cop.h
    M deb.c
    M embed.fnc
    M inline.h
    M intrpvar.h
    M perl.c
    M pp.h
    M proto.h
    M scope.c
    M sv.c
    A t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: first pass, marks are now 64-bits on 64-bit platforms

The basic test passes

Works towards #20917


  Commit: 51c20743966363944d610bca4ea2bb747ea67e52
      
https://github.com/Perl/perl5/commit/51c20743966363944d610bca4ea2bb747ea67e52
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M XSUB.h
    M ext/XS-APItest/APItest.xs
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: ensure XS sees the large parameter lists

Done by updating the definitions for AX and items to SSize_t

The bootcheck macros will require a bit more work, and need
a separate test.


  Commit: 0d2cef13166ff59d2c02db1f782f008f67fe3f8c
      
https://github.com/Perl/perl5/commit/0d2cef13166ff59d2c02db1f782f008f67fe3f8c
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M pp.c
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: list slicing


  Commit: 79dad5ac9784d5cdd158d37c15973f42dbabff4d
      
https://github.com/Perl/perl5/commit/79dad5ac9784d5cdd158d37c15973f42dbabff4d
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M cop.h
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: fix the iteration context base stack index


  Commit: 3bbaf75567c3b92d299cd88e61c86b250b2717ff
      
https://github.com/Perl/perl5/commit/3bbaf75567c3b92d299cd88e61c86b250b2717ff
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M pp.c
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: fix pp_split I32 stack base index


  Commit: e74c65fe4e0efc299ce044f1e9b36fc41fe928c3
      
https://github.com/Perl/perl5/commit/e74c65fe4e0efc299ce044f1e9b36fc41fe928c3
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M XSUB.h
    M embed.fnc
    M perl.c
    M proto.h
    M t/bigmem/stack.t
    M util.c

  Log Message:
  -----------
  64-bit stack: XS boot helpers

I'm not entirely happy with this, since we're changing the return
type and the types of the items and ax values passed via va_args.

But an excuse: the return and the fetching of ax and items via
va_args both happen after we've validated the handshake key, which
would prevent the va_arg() fetches and the return.

But but: this is fine for va_args, but purely the call to the
function with the different return type is technically undefined
behaviour.

I'm not sure it's worth trying to workaround that, since it will
require code duplication for a rare case, that I expect to just
work on the platforms involved (64-bit platforms).


  Commit: a50cfe58a2845c7ae093d4505f4cbd267a999b07
      
https://github.com/Perl/perl5/commit/a50cfe58a2845c7ae093d4505f4cbd267a999b07
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: reorganise to allow running single tests

The tests here move/set a lot of memory, and this makes them slow.

If we want to debug a particular test, running them all wastes
a lot of time, so allow particular tests to be run.


  Commit: 7ae5a6bd7448c09e19a1c934433c8409ac0a5efb
      
https://github.com/Perl/perl5/commit/7ae5a6bd7448c09e19a1c934433c8409ac0a5efb
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: pp_list used I32 to save the mark

OP_LIST is optimised away in many cases, the hard part was
creating the test.

This ended up being fixed by one of Dave's rc_stack patches, but leave
the test in.


  Commit: 029fb41fb6bda06fd7b4f75e77b205136f19ace7
      
https://github.com/Perl/perl5/commit/029fb41fb6bda06fd7b4f75e77b205136f19ace7
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M pp.c
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: chop/chomp on an AV used 32-bit indexes

Not really related to the stack, but this came up when searching
for I32 mis-use.

This didn't crash, instead the loop exited early.


  Commit: fa0c22a184c1a54a0fbff7c01fd4e84e88e3f807
      
https://github.com/Perl/perl5/commit/fa0c22a184c1a54a0fbff7c01fd4e84e88e3f807
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M pp.c

  Log Message:
  -----------
  64-bit stack: pp_anonlist uses an I32 index

I can't write a test for this, I'd expect it to use at least 96GB
to test.


  Commit: 2b1a56964440a5805c677ce0d52192af18dd83f7
      
https://github.com/Perl/perl5/commit/2b1a56964440a5805c677ce0d52192af18dd83f7
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M pp_hot.c
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: grepwhile used I32 for the returned item count


  Commit: 494c5b7438ed198d2974328fee5d9eabb9441544
      
https://github.com/Perl/perl5/commit/494c5b7438ed198d2974328fee5d9eabb9441544
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M pp.c
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: list repeat (x)

This calls repeatcpy() which took an I32 for the size of the object
to copy, change this to SSize_t, and update the list code in
pp_repeat to only test if the new allocation would fail.


  Commit: 848e2c205d14e98afa9e3e4feb907e5c8edea877
      
https://github.com/Perl/perl5/commit/848e2c205d14e98afa9e3e4feb907e5c8edea877
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M pp_sys.c
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: I32/U32 mis-use in pp_tie


  Commit: 8d8ed39a7b6ee4e908e9cbfe1bee5517080076d9
      
https://github.com/Perl/perl5/commit/8d8ed39a7b6ee4e908e9cbfe1bee5517080076d9
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M pp_sys.c

  Log Message:
  -----------
  64-bit stack: pp_syscall used I32 for the item count

No real way to test this.

i looks suspicious too, but it can't go above 15.


  Commit: dd4350909e3009fa6d166c38cc14a9b5c8fd5b3c
      
https://github.com/Perl/perl5/commit/dd4350909e3009fa6d166c38cc14a9b5c8fd5b3c
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M pp_ctl.c

  Log Message:
  -----------
  64-bit stack: pp_mapwhile

Since pp_mapwhile mortalcopy()s many SVs I don't have enough memory
to test this usefully, so no tests.


  Commit: bd47bb8e761112083a7a7db982628210941d6d58
      
https://github.com/Perl/perl5/commit/bd47bb8e761112083a7a7db982628210941d6d58
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M doio.c
    M embed.fnc
    M pp_sys.c
    M proto.h
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: apply() accepts arguments from the stack

I do think it's unlikely apply() would be called with >2G filenames
or handles, but it's a limit.

The test is slow, very slow.


  Commit: 3730ded753d4c190bbf59336a51cd96bd4e110c0
      
https://github.com/Perl/perl5/commit/3730ded753d4c190bbf59336a51cd96bd4e110c0
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M doop.c
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: do_join() used I32 for number of items on the stack


  Commit: 528c41202d7320ea396a5104764a0362e6a067ac
      
https://github.com/Perl/perl5/commit/528c41202d7320ea396a5104764a0362e6a067ac
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M class.c
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: injected_constructor used an I32

index into the parameter list.


  Commit: f86ab41dd0ada1e6348cda5070803c7d2f8799e8
      
https://github.com/Perl/perl5/commit/f86ab41dd0ada1e6348cda5070803c7d2f8799e8
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M embed.fnc
    M ext/XS-APItest/APItest.xs
    M perl.c
    M proto.h
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: eval_sv() mark and argument count handling

eval_sv() had two problems, it saved the starting stack position
in an I32, so a call with a deep stack would save a negative or
otherwise invalid depth, and the return value was an I32, so
if the eval returned a large list the return count would overflow.


  Commit: 368aef349e40a088514f084dccf12c4e7f4853b2
      
https://github.com/Perl/perl5/commit/368aef349e40a088514f084dccf12c4e7f4853b2
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M embed.fnc
    M ext/XS-APItest/APItest.xs
    M perl.c
    M proto.h
    M t/bigmem/stack.t

  Log Message:
  -----------
  64-bit stack: call_sv mark and return value handling

call_sv() used I32 for a saved mark and the return value.

The XS::APItest call_sv() wrapper used an I32 index to reposition
the argument list supplied to call_sv().

I haven't created additional tests for call_argv(), call_pv() nor
call_method(), these simply pass the return value on, I don't think
it worth the extra tests.


  Commit: fdf5d79df2c93aeae40e2351d9e05fb18ae67604
      
https://github.com/Perl/perl5/commit/fdf5d79df2c93aeae40e2351d9e05fb18ae67604
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M MANIFEST
    M XSUB.h
    M class.c
    M cop.h
    M deb.c
    M doio.c
    M doop.c
    M embed.fnc
    M ext/XS-APItest/APItest.xs
    M inline.h
    M intrpvar.h
    M perl.c
    M pp.c
    M pp.h
    M pp_ctl.c
    M pp_hot.c
    M pp_sys.c
    M proto.h
    M scope.c
    M sv.c
    A t/bigmem/stack.t
    M util.c

  Log Message:
  -----------
  Several updates to support an argument stack over 2**31 entries on 64-bit 
systems

This makes MARK and most argument stack offsets and item counts into SSize_t 
instead
of I32.

You will need at least 32GB of memory just to store the argument stack
itself to reach these limits.

Fixes #20917


Compare: https://github.com/Perl/perl5/compare/d1183d1c8a1d...fdf5d79df2c9

Reply via email to