← Back to Pull requests

regexec.c: CURLY* nodes must clear minmod before shortcut exits #24930

Merged
richardleach merged 3 files (19 lines) on Oct 11, 2026 19:46 UTC
View on GitHub
richardleach richardleach commented on Oct 09, 2026 10:14 UTC
Author

GH #24926 showed that "aaaa" =~ /(?:x??\x{100})a+/ matches a when it should match aaaa.
This was because the non-greedy quantifier attached to x?? incorrectly bled over to affect a+.

Specifically, the minmod flag - which indicates that a non-greedy match should be performed - was not cleared by some CURLY regnodes prior to an early sayNO (and similar) jump following an unsuccessful match.
(This bug was inadvertently introduced in 5.18.0.)

This commit adds minmod = 0 to what look like the affected cases.

Note: please could the reviewer double-check the CURLYN and CURLYM_ cases.

Closes #24926

-------------------------------------------------------------------------------
This set of changes requires a perldelta entry, and it is included.

Diff: 19 lines (+18 / -1) across 3 files Reviewer: khwilliamson Review duration: 3452m
All Vouch review confidence checks passed
Residual risk 0.03 = Change Risk (0.24) × (1 − Review Confidence (0.89)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.24 · 19 lines diff across 3 files
0.24
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.89 · 1 substantive comment(s)
0.89
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
89%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.179
Real PR Conversation Timeline
3 items
khwilliamson khwilliamson approved these changes on Oct 11, 2026 18:57 UTC
Approved Reviewer

This looks reasonable, but I'm not very good with CURLY. I think it should be merged, and we'll see if anything breaks

richardleach richardleach commented on Oct 11, 2026 19:46 UTC
Author

This looks reasonable, but I'm not very good with CURLY. I think it should be merged, and we'll see if anything breaks

Cheers, will do. (I'm not 100% sure whether all pathways are now correct or not either.)

Reviewers
Assignees
richardleach richardleach
Labels
risk: low confidence: 89.1% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 23.8% (LOW) · Higher = larger blast radius
23.8%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 89.1% · Lower = rushed or shallow review
89.1%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 2.6% · Safe to merge
2.6%
Repository