Skip to content

Conversation

TimWolla
Copy link
Member

No description provided.

@TimWolla TimWolla requested a review from iluuu1994 September 15, 2025 12:30
TimWolla added a commit to TimWolla/php-src that referenced this pull request Sep 15, 2025
While investigating php#19842 I was wondering why non-interned string
didn't cause troubles, until I realized it was the value instead of the key.
Nevertheless it appears useful to check that the key is actually interned as
claimed by the caller to prevent hard-to-find bugs.
Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, not sure why I had created a temporary string.

@TimWolla TimWolla merged commit 1644af2 into php:master Sep 15, 2025
9 checks passed
@TimWolla TimWolla deleted the backtrace-flf-name-alloc branch September 15, 2025 17:19
TimWolla added a commit that referenced this pull request Sep 16, 2025
* zend_hash: Assert that the `interned` parameter is not a lie

While investigating #19842 I was wondering why non-interned string
didn't cause troubles, until I realized it was the value instead of the key.
Nevertheless it appears useful to check that the key is actually interned as
claimed by the caller to prevent hard-to-find bugs.

* zend_hash: Rename `interned` parameter name to `key_guaranteed_interned`
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