Skip to content

Fix List::Util::PP fallback failures in List::Util::MaybeXS #2000

Open

Description

@fglock

Summary

The pure-Perl fallback exercised by List::Util::MaybeXS 1.500015 diverges from standard Perl on both PerlOnJava backends. CPAN run 20261109-091152-39587 reports 13 failed subtests across 9 of 24 test programs; t/uniqnum.t and t/uniqnum-more.t also terminate before producing TAP.

Evidence

  • System Perl 5.42.2: all 24 test programs pass (1,189 tests).
  • PerlOnJava 5.44.1, source commit 43aaefaa9: JVM and interpreter both reproduce the failure set.
  • Environment: macOS arm64, Temurin Java 24.0.2.

Stable failing tests include:

  • t/first.t, t/reduce.t: return from callbacks does not produce the expected result.
  • t/pair.t: scalar pairgrep returns 4 where the expected matching-pair count is 2.
  • t/sum.t, t/product.t: combining Math::BigInt with built-in integers produces incorrect values.
  • t/uniqnum.t, t/uniqnum-more.t: List::Util::PP calls missing B::SVf_IVisUV and aborts.
  • t/first.t, t/reduce.t, t/reductions.t, t/uniq.t: refcount/destruction assertions fail; these ownership-path failures overlap Rewrite reference counting with complete Perl-compatible ownership semantics #1649 and should be coordinated with that work.

Acceptance

Add Perl-validated project regression coverage for each fixed behavior, retain the unfixed-parent evidence, and verify the affected cases on JVM and interpreter. Rerun the complete distribution suite after the independent fixes and coordinate the ownership-dependent cases with #1649 before claiming full suite parity.

Activity

  1. added
    bug
    area:runtime
    area:cpan-port
    on Nov 9, 2026
  2. fglock commented on Nov 9, 2026

    @fglock
    OwnerAuthor

    State: complete
    Agent/session: Codex / CPAN run 20261109-091152
    Scope: #2000, preserve RHS values during overloaded compound assignment, fixing the sum and product regressions in List::Util::PP.
    Result: PR #2004 merged to master as c09fdf7f935164ec55ae4e9c8ce8774a91ea7127. OverloadContext avoids invoking a right operand's mutating assignment overload for compound assignments and uses its normal binary overload. Added local List::Util::PP fixture and standard-Perl-validated regression coverage for BigInt precision and input preservation in sum and product.
    Evidence: system Perl test passed 4/4; focused JVM and interpreter tests passed 4/4 each; nice -n 19 make and make check-links passed on the rebased branch. GitHub CI passed for Ubuntu (including thread compatibility), Windows, and CodeQL before merge. Full CPAN suite improves on both backends from 9/24 failing programs and 13/350 failing subtests to 7/24 and 9/350; t/sum.t and t/product.t pass.
    Remaining issue scope: callback return/refcount behavior, scalar pairgrep context, object destruction/lifetime checks, and B::SVf_IVisUV coverage. These are documented in the follow-up comment below; the issue remains open for separate work. Lifecycle paths overlap active #1649 / draft PR #1938 and need coordination before changing shared files.

  3. fglock commented on Nov 9, 2026

    @fglock
    OwnerAuthor

    PR #2004 is merged as c09fdf7f935164ec55ae4e9c8ce8774a91ea7127 after all GitHub checks passed, including Linux/Ubuntu, Windows, CodeQL, and the Ubuntu Perl thread compatibility gate. It fixes the Math::BigInt mutation in List::Util::PP::sum and product; those upstream tests now pass. The full CPAN suite improves on both JVM and interpreter backends from 9/24 failing test programs (13/350 failing subtests) to 7/24 (9/350).

    The remaining failures are not fully fixed, so this issue stays open: callback return/refcount behavior (t/first.t, t/reduce.t), scalar pairgrep context (t/pair.t), object lifetime checks (t/reductions.t, t/uniq.t), and missing B::SVf_IVisUV (t/uniqnum*.t). Lifecycle and refcount paths overlap active #1649 / draft PR #1938 and need coordination before changes to their shared files.

  4. fglock commented on Nov 17, 2026

    @fglock
    OwnerAuthor

    State: active
    Agent/session: Codex / cpan-compat-2068-2038-2021-2000-20261117
    Scope: #2068 MakeMaker install_share; #2038 Object::InsideOut JVM dynamic exception method; #2021 Mock-Quick parser/runtime/backend gaps; #2000 List::Util::PP scalar pairgrep and B::SVf_IVisUV only, excluding ownership paths active under #2043.
    Work: branch fix/cpan-compat-2068-2038-2021-2000, source c832739ecc; single combined PR requested.
    Checkpoint: 2026-11-17 UTC. Checkout was clean and branch created. Read latest issue reports; #2000's BigInt fix is already merged in #2004 and its callback/refcount items overlap active ownership PR #1938/#2043. No overlapping claim found for the other three issues.
    Evidence: Current issue reports identify four separate behavior classes. Existing #2000 suite evidence is CPAN run 20261109-091152-39587; remaining independent targets are scalar pairgrep context and missing B::SVf_IVisUV. Current ownership handoff is #2043, PR #1938.
    Blocked by: none; any lifecycle-related #2000 findings will be reported and held from implementation until ownership work is coordinated.
    Next: refresh focused reproducers on current master, add system-Perl-validated tests, implement independent causes, then run both backends, distribution acceptances and full required gates.

  5. fglock commented on Nov 17, 2026

    @fglock
    OwnerAuthor

    PR #2087 has merged as a2098dc5c6d9354848eb0969e8d094336fa9cafe. It fixes the unsigned-integer/uniqnum portion of this issue, including B::SVf_IVisUV and integer precision through parsing and packing.

    The broader issue remains open because callback and object-lifetime failures are not resolved. Scalar pairgrep now has a focused follow-up in #2084; callback/object-lifetime work remains tracked with #2043 / PR #1938. The original issue stays open until those behaviors are fixed.

  6. added
    blocked:ownership
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cpan-portarea:runtimeblocked:ownershipbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions