Skip to content

Fix Calendar::createInstance double-free of the adopted TimeZone - #231

Closed
iliaal wants to merge 1 commit into
masterfrom
fix/intl-cal-create-df
Closed

Fix Calendar::createInstance double-free of the adopted TimeZone#231
iliaal wants to merge 1 commit into
masterfrom
fix/intl-cal-create-df

Conversation

@iliaal

@iliaal iliaal commented Aug 16, 2026

Copy link
Copy Markdown
Owner

ICU 57+ Calendar::createInstance adopts the TimeZone and deletes it if the calendar cannot be created. createInstance and fromDateTime deleted that pointer again on failure. Drop those deletes.

ICU 57+ Calendar::createInstance wraps the TimeZone in a LocalPointer
and deletes it when the calendar cannot be created. PHP deleted the
same pointer again on that failure. Drop the extra delete in
createInstance and fromDateTime.
@iliaal

iliaal commented Aug 16, 2026

Copy link
Copy Markdown
Owner Author

Promoted: php#23320

@iliaal iliaal closed this Aug 16, 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.

1 participant