Skip to content

zend_builtin_functions: Do not allocate to store name of FLF when fetching backtrace - #19842

Merged
TimWolla merged 1 commit into
php:masterfrom
TimWolla:backtrace-flf-name-alloc
Sep 15, 2025
Merged

zend_builtin_functions: Do not allocate to store name of FLF when fetching backtrace#19842
TimWolla merged 1 commit into
php:masterfrom
TimWolla:backtrace-flf-name-alloc

Conversation

@TimWolla

Copy link
Copy Markdown
Member

No description provided.

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.

@iluuu1994iluuu1994 left a comment

Copy link
Copy Markdown
Member

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:masterSep 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 freeto 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

@TimWolla@iluuu1994