Skip to content

fix: preserve readonly coercion caller aggregates - #1280

Merged
fglock merged 1 commit into
masterfrom
fix/issue-1108-readonly-hash
Sep 7, 2026
Merged

fix: preserve readonly coercion caller aggregates#1280
fglock merged 1 commit into
masterfrom
fix/issue-1108-readonly-hash

Conversation

@fglock

@fglock fglock commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve caller-owned arrays and hashes when generated coercion callbacks unwind
  • keep Internals::SvREFCNT high enough for Const::Fast to clone before freezing
  • add focused regression coverage for generated array/hash coercions

Fixes #1108.

Validation

  • make
  • prove src/test/resources/unit/readonly_coercion_argument_lifetime.t
  • JVM and interpreter runs of readonly_coercion_argument_lifetime.t
  • timeout 600 ./jcpan -t Types::Const (17 files, all successful)

Generated with Codex

Do not run lexical aggregate cleanup for arrays and hashes borrowed through
an active argument frame. This keeps SvREFCNT accurate for Const::Fast so
Types::Const clones before freezing its coercion result.

Generated with [Codex](https://openai.com/codex/)

Co-Authored-By: Codex <codex@openai.com>
@fglock
fglock marked this pull request as ready for review September 7, 2026 14:28
@fglock
fglock merged commit 9d492cf into master Sep 7, 2026
2 checks passed
@fglock
fglock deleted the fix/issue-1108-readonly-hash branch September 7, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Types::Const fails due incomplete readonly reference/hash semantics

1 participant