Skip to content

Fix GH-25766: enchant_dict_suggest() crashes with JIT when the result for a word without suggestions is modified - #25767

Open
thunderer wants to merge 1 commit into
php:PHP-8.6from
thunderer:fix/enchant-dict-suggest-refcount
Open

thunderer wants to merge 1 commit into
php:PHP-8.6from
thunderer:fix/enchant-dict-suggest-refcount

Conversation

@thunderer

Copy link
Copy Markdown
Contributor

Fixes GH-25766.

Since 5dd5a42, enchant_dict_suggest() returns the shared immutable empty array for a word without suggestions. The stub still declared @refcount 1, so function JIT and tracing JIT modified that array in place and crashed.

This drops the annotation and regenerates the arginfo and optimizer info, as e43d3d1 did for array_column(). The test fails without the change.

…ult for a word without suggestions is modified

Since 5dd5a42, enchant_dict_suggest() returns the shared immutable empty
array for a word without suggestions. The stub still declared @refcount 1,
which lets function JIT and tracing JIT modify the result in place and crash.
Drop the annotation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants