Branch: refs/heads/yves/caret_rng_hook
  Home:   https://github.com/Perl/perl5
  Commit: ad2f90afa43f9094100842c4720e1b06c3107f55
      
https://github.com/Perl/perl5/commit/ad2f90afa43f9094100842c4720e1b06c3107f55
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M pod/perlfunc.pod
    M pod/perlrun.pod
    M t/run/runenv_randseed.t

  Log Message:
  -----------
  PERL_RAND_SEED: document zero as automatic seeding

PERL_RAND_SEED only enables the deterministic no-argument srand() sequence
when its parsed seed is nonzero. A parsed zero leaves the override disabled,
so srand() obtains an automatic seed.

This is the existing implementation. Documenting it is less surprising than
changing zero into a special deterministic state, and avoids a new zero-state
rule for the xorshift sequence.

Add a regression test for the documented behaviour.


  Commit: c3d7edf773066e118ccfb997014f7f62709f21ce
      
https://github.com/Perl/perl5/commit/c3d7edf773066e118ccfb997014f7f62709f21ce
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M MANIFEST
    M Porting/config_H
    M config_h.SH
    A t/porting/win32_config.t
    M win32/config.gc
    M win32/config.vc
    M win32/config_H.gc
    M win32/config_H.vc
    M win32/config_sh.PL

  Log Message:
  -----------
  config: expose the U64 unsigned decimal format

Configure already finds the printf conversion for an unsigned U64. Export it
as U64uf, next to UVuf, so code which stores a U64 does not have to assume
that UV is wide enough or that a particular C format spelling works.

Keep the definition conditional on d_PRIu64. Win32 records I64 conversions
when IV and UV are 32 bits because U64 is still a quad in that configuration.


  Commit: 85918f8fe47537475437b9e6f83eb0407b49a633
      
https://github.com/Perl/perl5/commit/85918f8fe47537475437b9e6f83eb0407b49a633
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M embed.fnc
    M embed.h
    M perl.c
    M perl.h
    M proto.h
    M util.c

  Log Message:
  -----------
  util: extract portable entropy acquisition

Make the operating-system entropy path available to callers that need more
than one U64. Perl_get_entropy_portable() fills an arbitrary number of octets
and makes the weak-versus-strong failure policy explicit.

The helper tries getentropy(), the configured random device, and
SystemFunction036. A weak caller falls back to mixed process state. A strong
caller gets its supplied error if no operating-system source succeeds.
Perl_seed() stays as the U64 compatibility wrapper for existing XS users.

Use the weak interface for Perl internal random initialization. This keeps its
previous fallback policy while giving new code one portable entry point.


  Commit: 9f4348fd2f7a7026e79e6558bc8411e273a873e5
      
https://github.com/Perl/perl5/commit/9f4348fd2f7a7026e79e6558bc8411e273a873e5
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M MANIFEST
    M Makefile.SH
    M Porting/Maintainers.pl
    M Porting/config.sh
    A dist/RNG/Changes
    A dist/RNG/MANIFEST
    A dist/RNG/Makefile.PL
    A dist/RNG/README
    A dist/RNG/RNG.xs
    A dist/RNG/lib/RNG.pm
    A dist/RNG/lib/RNG/Drand48.pm
    A dist/RNG/lib/RNG/HMAC_DRBG.pm
    A dist/RNG/lib/RNG/PCG.pm
    A dist/RNG/lib/RNG/Provider.pm
    A dist/RNG/lib/RNG/Seed.pm
    A dist/RNG/lib/RNG/SeedBase.pm
    A dist/RNG/lib/RNG/Wyrand.pm
    A dist/RNG/lib/RNG/Xoshiro.pm
    A dist/RNG/t/compat.t
    A dist/RNG/t/distributions.t
    A dist/RNG/t/drand48.t
    A dist/RNG/t/hmac_drbg.t
    A dist/RNG/t/pcg.t
    A dist/RNG/t/seed.t
    A dist/RNG/t/wyrand.t
    A dist/RNG/t/xoshiro.t
    M lib/.gitignore
    M win32/GNUmakefile
    M win32/Makefile

  Log Message:
  -----------
  dist/RNG: add random providers and distributions

Add RNG as the common layer for byte-oriented random generators and the
distribution helpers built on top of them. A provider supplies rand_bytes()
and srand(). The helpers use those octets for bounded integers, dice, and
weighted choices without knowing a provider state format.

RNG::SeedBase identifies exact raw state material. Ordinary seed values stay
UTF-8 strings, while a SeedBase object lets a caller replay a provider state
without deriving it again. This keeps the portable interface separate from
each generator implementation.

Bundle Drand48, PCG, Wyrand, Xoshiro, and HMAC_DRBG. Their XS code keeps state
in scalar storage and may publish a native U64 callback. That callback is
optional. rand_bytes() is the portable contract.

The module shim supports the same contract on supported older Perls without
requiring the later core ${^RNG} hook.


  Commit: 72e365965e3b0e3667a4fec32ab4072ca2362cc9
      
https://github.com/Perl/perl5/commit/72e365965e3b0e3667a4fec32ab4072ca2362cc9
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M MANIFEST
    M builtin.c
    M embed.fnc
    M embed.h
    M embedvar.h
    M gv.c
    M intrpvar.h
    M lib/builtin.pm
    M mg.c
    M perl.c
    M perl.h
    M pod/perl.pod
    M pod/perldelta.pod
    M pod/perldiag.pod
    M pod/perlfunc.pod
    A pod/perlrng.pod
    M pod/perlvar.pod
    M pp.c
    M proto.h
    M sv.c
    M t/harness
    M t/lib/warnings/9uninit
    M t/lib/warnings/pp
    A t/op/rng/contract.t
    M t/op/srand.t
    M t/perf/benchmarks
    A t/perf/rng-benchmarks
    M t/porting/known_pod_issues.dat
    M util.h
    M win32/pod.mak

  Log Message:
  -----------
  rng: let rand use selected providers

Make ${^RNG} select the generator used by rand(), srand(), and
builtin::rand_bytes(). The variable accepts an RNG::Provider object or undef.
It is dynamically scoped, but selecting a provider does not copy its state.

The core calls rand_bytes() for the portable path. XS providers can publish a
U64 callback and state pointer for rand() so the common case does not pay for
method dispatch. Assignment to ${^RNG}, and provider srand(), refresh the
cache before it is used again.

srand() now turns ordinary defined arguments into UTF-8 strings. Built-in
Drand48 retains its historical numeric handling and reports when it discards
bits above 32. SeedBase supplies exact raw state material. Redacted seeds fail
before their material is requested.

Add diagnostics, documentation, and core tests for the protocol, seed rules,
callback cache, and byte-count validation.


  Commit: 93148eea0b760d47ee4efdc867a25d87cea15b8e
      
https://github.com/Perl/perl5/commit/93148eea0b760d47ee4efdc867a25d87cea15b8e
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M .github/workflows/testsuite.yml
    M Porting/test-dist-modules.pl

  Log Message:
  -----------
  Porting: test RNG on supported older Perls

RNG supports Perl 5.24 and later, but the List::Util bundled with 5.24 is
older than RNG requires. Let the external-distribution test runner skip RNG
below that floor.

For the 5.24 test job, install a current List::Util and put its site
directories before the core library paths which MakeMaker prepends. Check the
installed version before running the distribution tests so this compatibility
requirement cannot silently regress.


  Commit: 89ed7872f3bc3aa6595c71b6a63b3081435e06b7
      
https://github.com/Perl/perl5/commit/89ed7872f3bc3aa6595c71b6a63b3081435e06b7
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M dist/RNG/RNG.xs
    M dist/RNG/t/drand48.t

  Log Message:
  -----------
  fixup! dist/RNG: add random providers and distributions

Document why the Drand48 byte adapter keeps the high 32 bits of each
48-bit transition. Compare its byte stream with the core implementation
across various lengths that end within and between four-byte chunks.


  Commit: aec53c2184e99156021641966266f375cfb7838b
      
https://github.com/Perl/perl5/commit/aec53c2184e99156021641966266f375cfb7838b
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M pp.c

  Log Message:
  -----------
  fixup! rng: let rand use selected providers

Use newSVpvs("") to create an empty string.


  Commit: 07ab24478c52de81c7cf08c67a2c6979c7cbd5dd
      
https://github.com/Perl/perl5/commit/07ab24478c52de81c7cf08c67a2c6979c7cbd5dd
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M pp.c

  Log Message:
  -----------
  fixup! rng: let rand use selected providers

The provider's srand callback can grow Perl's stack. Refresh SP before
popping the original arguments or pushing the result.


  Commit: 2a7ee423d0cce931555e5c6f9e624bdcd35aa895
      
https://github.com/Perl/perl5/commit/2a7ee423d0cce931555e5c6f9e624bdcd35aa895
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M t/op/rng/contract.t

  Log Message:
  -----------
  fixup! rng: let rand use selected providers

Exercise a provider callback that grows the Perl stack before returning.
This covers the stack refresh required before pp_srand pushes the result.


  Commit: 3518b47f81d81739ebc040443b2b0af5d59e0012
      
https://github.com/Perl/perl5/commit/3518b47f81d81739ebc040443b2b0af5d59e0012
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M embed.fnc
    M embed.h
    M pp.c
    M proto.h
    M t/op/rng/contract.t
    M util.c

  Log Message:
  -----------
  fixup! rng: let rand use selected providers

Return the advanced 48-bit Drand48 state so rand_bytes can select its
high 32 bits without converting through NV. Emit that word least
significant byte first and handle a partial final word in the switch.

Test the default generator for the requested length and seeded
repeatability.


  Commit: 2f0e2f687e365e7a59be1979feb114854bef3567
      
https://github.com/Perl/perl5/commit/2f0e2f687e365e7a59be1979feb114854bef3567
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M dist/RNG/RNG.xs
    M dist/RNG/t/drand48.t

  Log Message:
  -----------
  fixup! dist/RNG: add random providers and distributions

Emit each Drand48 word least significant byte first, matching the
builtin rand_bytes byte stream. Keep the copy switch layout aligned
with the builtin implementation.

Check a seeded byte sequence and compare provider output with the
builtin across full and partial words.


  Commit: 6e2c1b5c939a38ce6361ff631a72c5acbc417d39
      
https://github.com/Perl/perl5/commit/6e2c1b5c939a38ce6361ff631a72c5acbc417d39
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M t/op/rng/contract.t
    M util.c

  Log Message:
  -----------
  fixup! util: extract portable entropy acquisition

Add a DEBUGGING-only environment override that skips native entropy sources so
the weak entropy fallback can be exercised on ordinary hosts. Strong entropy
requests continue to report failure instead of using the fallback.

Test weak seeding and verify secure HMAC_DRBG construction fails under
the override.


  Commit: 2e5bff11f9079513dbab9486e1af9e18342f0532
      
https://github.com/Perl/perl5/commit/2e5bff11f9079513dbab9486e1af9e18342f0532
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M dist/RNG/RNG.xs
    M dist/RNG/t/pcg.t

  Log Message:
  -----------
  fixup! dist/RNG: add random providers and distributions

Use only the bits representable by the configured NV mantissa when mapping a
U64 to a value below one.  Scaling the full integer can round the largest
values to 1.0 on NV formats with fewer than 64 significand bits.

Fetch the PCG constructor seed before checking its type.  This avoids a second
magic fetch for tied seeds.  The regression test checks that FETCH runs once
and that the resulting rng sequence matches one initialized from an ordinary
seed.


  Commit: f490bdeb0782aacbd81c9e24365bf5d351c29a8f
      
https://github.com/Perl/perl5/commit/f490bdeb0782aacbd81c9e24365bf5d351c29a8f
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M builtin.c
    M embed.fnc
    M pp.c
    M t/op/rng/contract.t

  Log Message:
  -----------
  fixup! rng: let rand use selected providers

Use PP stack operations in rand() and srand() so provider callbacks can grow
the Perl stack safely.  Replace the argument with the result through RPP
helpers, and handle the reserved null slot used for calls without an
argument.  This also removes the PP_wrapped overhead.

Fetch seed magic before inspecting or converting the seed.  Check redaction
after the fetch, and use no-magic conversion afterward so tied seeds are not
fetched again.  Refresh SP after a rand_bytes provider callback before storing
its result in the XSUB argument stack.

Allocate the default rand_bytes result after seeding and at its final size.
Keep the set_caret_X comment with its entry in embed.fnc.

Add tests for one-time tied-seed fetches, provider callbacks that grow the
stack in rand(), srand(), and builtin::rand_bytes(), and all-ones provider
output remaining below one.


  Commit: b191eb87244731d12368df55238e5e8193942616
      
https://github.com/Perl/perl5/commit/b191eb87244731d12368df55238e5e8193942616
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M dist/RNG/RNG.xs
    M dist/RNG/t/hmac_drbg.t
    M dist/RNG/t/seed.t

  Log Message:
  -----------
  fixup! dist/RNG: add random providers and distributions

Fetch get magic before checking optional RNG inputs or reading their flags.
ParseXS supplies NULL for omitted optional SV arguments, so guard each fetch
before calling SvGETMAGIC().  Check definedness after the fetch so tied values
can provide their value.

Use non-magic accessors after the explicit fetch to avoid running FETCH twice.
Add tied-scalar tests for each provider and for HMAC_DRBG entropy, reseed,
personalization, interval, and prediction-resistance inputs.


  Commit: 9eb98c6500cf2a404b36f8a4e3dd06adeeec012d
      
https://github.com/Perl/perl5/commit/9eb98c6500cf2a404b36f8a4e3dd06adeeec012d
  Author: Yves Orton <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M builtin.c
    M dist/RNG/RNG.xs
    M pp.c

  Log Message:
  -----------
  fixup! rng: let rand use selected providers

Use the RC-aware stack ownership protocol when the RNG XS seed helper calls a
Perl method.  Preserve the active stack mode, refresh SP after extending the
stack, and balance the temporary stack reference in RC mode.

The builtin rand_bytes XSUB uses the legacy XS wrapper.  Mortalize its
allocated result so the wrapper can transfer it to the caller without leaking
it.  Keep SP refreshed after the provider callback, which may grow the stack.


  Commit: 8401d17a916a973a1a0dc23c23faeb5e045aaf74
      
https://github.com/Perl/perl5/commit/8401d17a916a973a1a0dc23c23faeb5e045aaf74
  Author: Yves Orton <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M MANIFEST
    M dist/RNG/Changes
    M dist/RNG/MANIFEST
    M dist/RNG/README
    M dist/RNG/RNG.xs
    M dist/RNG/lib/RNG/PCG.pm
    A dist/RNG/lib/RNG/PCG/RXS_M_XS_64_64.pm
    A dist/RNG/lib/RNG/PCG/Variant.pm
    A dist/RNG/lib/RNG/PCG/XSL_RR_128_64_LCG.pm
    A dist/RNG/lib/RNG/PCG/XSL_RR_128_64_MCG.pm
    M dist/RNG/lib/RNG/Seed.pm
    A dist/RNG/t/pcg_variants.t

  Log Message:
  -----------
  dist/RNG: add three PCG variants with 64-bit output

Add PCG RXS-M-XS 64/64 and PCG XSL-RR 128/64 with MCG and LCG state
transitions.  Each algorithm has its own provider class and XS callback.
RNG::PCG selects a class at construction, avoiding an algorithm check
for each generated value.

Use native unsigned 128-bit arithmetic when the compiler advertises
support.  Other targets use two 64-bit words and a portable wide
multiply.  Keep the MCG and LCG transitions separate so the MCG path
does not perform an increment addition.  Generation helpers use
PERL_STATIC_INLINE to expose the small operations to the compiler.

Expand ordinary seeds with a separate HMAC-SHA-256 domain label for
each algorithm.  The LCG uses 16 bytes for state and 16 for its stream
increment, whose low bit is set with | 1.  Raw seeds use the same layout
and adjustment.  The MCG similarly makes its state odd without shifting
it, so applying the adjustment again preserves the state.

Add published PCG reference vectors using raw initializers to isolate
algorithm behavior from seed expansion.  XSL-RR produces output from
the updated state, while RXS-M-XS uses the old state.  Document the
variants, constructor option, raw widths, and portable arithmetic.


  Commit: eb1b7337594fa8942c889b3aeba837207e3a7b7d
      
https://github.com/Perl/perl5/commit/eb1b7337594fa8942c889b3aeba837207e3a7b7d
  Author: Yves Orton <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M dist/RNG/Changes
    M dist/RNG/RNG.xs
    M dist/RNG/lib/RNG/Drand48.pm
    M dist/RNG/t/drand48.t
    M pod/perlfunc.pod
    M pod/perlrng.pod
    M pp.c
    M t/op/srand.t

  Log Message:
  -----------
  fixup! rng: let rand use selected providers

Restore the historical "0 but true" return for a zero Drand48
initializer in both core and RNG::Drand48.  Recognize that exact string
in the compatibility parsers so feeding the return value back into
srand() recreates the zero-seed sequence.

Keep this quirk confined to Drand48.  Other providers treat the string
as ordinary seed material.  Describe the returned value as an
initializer rather than an internal state, including the decimal-string
return needed when RNG::Drand48's initializer exceeds native UV width.

Restore the truthiness and numeric-conversion checks for srand(0), and
add replay checks for both the returned value and the literal string.
Overflow-reduced zero initializers retain the same historical return.


  Commit: 85bc2f1a6a308de99589ba666afdc36a8fe929bb
      
https://github.com/Perl/perl5/commit/85bc2f1a6a308de99589ba666afdc36a8fe929bb
  Author: Yves Orton <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M MANIFEST
    M dist/RNG/Changes
    M dist/RNG/MANIFEST
    M dist/RNG/RNG.xs
    M dist/RNG/lib/RNG.pm
    M dist/RNG/lib/RNG/HMAC_DRBG.pm
    M dist/RNG/lib/RNG/PCG.pm
    M dist/RNG/lib/RNG/Seed.pm
    M dist/RNG/lib/RNG/Wyrand.pm
    M dist/RNG/lib/RNG/Xoshiro.pm
    A dist/RNG/t/replay.t
    M dist/RNG/t/seed.t
    M pod/perldelta.pod
    M pod/perlfunc.pod
    M pod/perlrng.pod

  Log Message:
  -----------
  fixup! dist/RNG: add random providers and distributions

Return false ordinary seed strings as true RNG::Seed objects without
changing their string value or the initialization they reproduce.
This lets callers distinguish a successful srand() from a false seed
value while preserving the replay rule for "" and "0".

Separate ordinary string seeds from raw state.  from_string() keeps the
normal string expansion path, while from_bytes() creates RNG::Seed::Raw
objects implementing RNG::SeedBase.  Redacted seeds retain that protocol
so attempts to reuse them are rejected.  Boolean overloading returns
true, stringification preserves the material, and numeric conversion
follows the normal conversion of the stored string.

Apply the false-seed wrapper to the shared provider srand helper and
HMAC_DRBG.  Stop numerically converting HMAC_DRBG's explicit seed for
an XS return value that its Perl wrapper does not use.  This avoids
spurious numeric warnings for overloaded raw seeds.

Add replay checks across the bundled providers through direct methods
and core dispatch.  Cover ordinary, Unicode, raw, absent, and undefined
seeds, including normalization of raw states.  Check that returns are
defined and true and reproduce mixed rand() and rand_bytes() requests
on both the original generator and a fresh one.  Document the string
and raw representations and their return behavior.


  Commit: 5dc9d5592f663a47453c2b31a3d53aa1825ce72c
      
https://github.com/Perl/perl5/commit/5dc9d5592f663a47453c2b31a3d53aa1825ce72c
  Author: Yves Orton <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M dist/RNG/Changes
    M dist/RNG/RNG.xs

  Log Message:
  -----------
  fixup! dist/RNG: add random providers and distributions

Allocate length + 3 bytes for the older-Perl rand_bytes shim before
writing its output.  A zero-length request must still have a PV buffer
for the terminating NUL instead of relying on newSV(0) to allocate one.

Reserve space for the NUL, the COW refcount byte, and one spare byte.
Keep the requested string length unchanged.


  Commit: 2d6276a103553b5697f87e3f122b62535ea07062
      
https://github.com/Perl/perl5/commit/2d6276a103553b5697f87e3f122b62535ea07062
  Author: Yves Orton <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M dist/RNG/lib/RNG.pm

  Log Message:
  -----------
  fixup! dist/RNG: add random providers and distributions

Alias the older-Perl builtin::rand_bytes shim directly to
_compat_rand_bytes instead of installing a forwarding subroutine.
Give the compatibility function the builtin's one-argument prototype
so the alias preserves its calling convention without an extra frame.

Remove the _bytes wrapper and its unused provider argument.  The
sampling helpers call builtin::rand_bytes directly, using either the
native implementation or the installed compatibility alias.  Suppress
the experimental builtin warning where these calls are compiled.


  Commit: 4d94864ddb30fb0242313a750a1d6fb7518edbde
      
https://github.com/Perl/perl5/commit/4d94864ddb30fb0242313a750a1d6fb7518edbde
  Author: Yves Orton <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M pp.c

  Log Message:
  -----------
  fixup! rng: let rand use selected providers

Keep the cold seeding and provider fallback functions out of pp_rand()
to avoid stack-protector overhead on its common path.  Inlining these
functions exposes the addresses of their local entropy and byte buffers,
causing the compiler to add a stack canary to the caller.

Split default initialization into a small inline check and an
out-of-line seeding function.  Mark that function and the provider U64
fallback noinline for GCC, Clang, and MSVC, with an empty definition for
other compilers.  Keep the attribute macro local to these helpers.

The prior inline audit compared generated code and profiles with the
seeding and fallback paths kept out of line.  This preserves the small
common path without changing initialization or provider behavior.


  Commit: 2ddd93f0b5b7fca792ac8a54ed8b009ce783679b
      
https://github.com/Perl/perl5/commit/2ddd93f0b5b7fca792ac8a54ed8b009ce783679b
  Author: Yves Orton <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M t/perf/rng-benchmarks

  Log Message:
  -----------
  t/perf: compare RNG byte output and sample workloads

Extend the RNG benchmark suite with a 512-byte builtin::rand_bytes
request and support for all three new PCG providers.  Keep the byte
workload separate from blead comparisons because blead has no matching
builtin API.

Add workloads using 256, 1024, and 4096 values.  Each builds an array,
tracks a sum and sum of squares, computes mean and sample standard
deviation, sorts the values, and stores extrema, quartiles, median,
and P90, P95, and P99 in a result hash.

Pair each random-input workload with one reading precomputed values.
Reseed the random workload before each measured pass so both partners
sort the same sequence.  This compares the additional instruction cost
of generating values while keeping the surrounding work equivalent.
It does not isolate all RNG instructions or measure a runtime share.


  Commit: 2b450c7684ff8e9058e501b779f52ee1ce6dd69a
      
https://github.com/Perl/perl5/commit/2b450c7684ff8e9058e501b779f52ee1ce6dd69a
  Author: Yves Orton <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M Makefile.SH

  Log Message:
  -----------
  fixup! dist/RNG: add three PCG variants with 64-bit output

Regenerate the library cleanup rules after adding the PCG provider
modules.  Their paths in MANIFEST introduce lib/RNG/PCG, which must be
removed before lib/RNG during cleanup.

Run regen/lib_cleanup.pl to update the generated block in Makefile.SH.
The Windows rules already remove lib/RNG recursively and need no change.
All 47 checks in porting/regen.t now pass.


  Commit: 4833fd1444dff224d1e8507dbae2250a91921b03
      
https://github.com/Perl/perl5/commit/4833fd1444dff224d1e8507dbae2250a91921b03
  Author: Yves Orton <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M dist/RNG/RNG.xs
    M dist/RNG/t/seed.t

  Log Message:
  -----------
  fixup! dist/RNG: add random providers and distributions

Backport the no-magic byte and UTF-8 conversions locally when the Perl
headers lack SvPVbyte_nomg or SvPVutf8_nomg.  These wrappers are absent
on the supported minimum Perl 5.24, and ppport.h does not supply them.
Without replacements, the XS library builds with unresolved symbols
and cannot load.

Use the older downgrade or no-magic upgrade operation, then read the
converted buffer with SvPV_nomg.  Copy read-only values and references
before changing their encoding, matching the native wrappers.  Keep
magic fetching with the existing callers so tied seeds are fetched once.
Newer Perls retain their native macros.

Add raw-seed checks for successful downgrade of characters through 255
and rejection of code points which cannot fit in a byte.  Existing tests
cover Unicode string seeds, overloaded seeds, and tied inputs.

All 10 RNG test files pass, with 370 tests per run, on Perl 5.24.4 in
threaded, unthreaded, debugging, and threaded debugging builds.  The
same suite passes on Perl 5.30.3 and 5.36.3.  Build logs are saved under
tmp/rng-pv-compat in the workspace.


Compare: https://github.com/Perl/perl5/compare/683838f9b615...4833fd1444df

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

Reply via email to