Skip to content

fix(class): route Rust prop access through the declared slot and the getter/setter - #801

Merged
ptondereau merged 3 commits into
masterfrom
fix/prop-getter-slot-leak
Oct 4, 2026
Merged

ptondereau merged 3 commits into
masterfrom
fix/prop-getter-slot-leak

Conversation

@ptondereau

Copy link
Copy Markdown
Member

Description

A Rust property value now goes into the declared property slot, so Exception::getMessage and other C callers do not leak it. Compound operators, unset, == and the engine property cache now use the Rust getter and setter.

Fixes #738

Checklist

@coveralls

coveralls commented Oct 4, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 37217587832

Coverage decreased (-0.8%) to 70.157%

Details

  • Coverage decreased (-0.8%) from the base build.
  • Patch coverage: 210 uncovered changes across 1 file (0 of 210 lines covered, 0.0%).
  • 8 coverage regressions across 2 files.

Uncovered Changes

File Changed Covered %
src/zend/handlers.rs 210 0 0.0%

Coverage Regressions

8 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
src/zend/handlers.rs 7 0.0%
crates/introspection/src/stub.rs 1 88.46%

Coverage Stats

Coverage Status
Relevant Lines: 14563
Covered Lines: 10217
Line Coverage: 70.16%
Coverage Strength: 60.64 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 30 untouched benchmarks
🆕 6 new benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 property_compares[1] N/A 125.2 ms N/A
🆕 property_compares[10] N/A 125.2 ms N/A
🆕 property_compares[100000] N/A 544.3 ms N/A
🆕 property_compound_ops[1] N/A 125.2 ms N/A
🆕 property_compound_ops[10] N/A 125.2 ms N/A
🆕 property_compound_ops[100000] N/A 698.5 ms N/A

Comparing fix/prop-getter-slot-leak (70855cb) with master (844d387)

Open in CodSpeed

@ptondereau
ptondereau marked this pull request as ready for review October 4, 2026 17:41
@ptondereau
ptondereau merged commit 1be9f60 into master Oct 4, 2026
73 checks passed
@ptondereau
ptondereau deleted the fix/prop-getter-slot-leak branch October 4, 2026 17:41
@Xenira Xenira mentioned this pull request Oct 4, 2026
@ext-php-rs-release ext-php-rs-release Bot mentioned this pull request Oct 6, 2026
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.

Fix #[php(prop)] String getter leak on Exception::getMessage path

2 participants