Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add block size support for tracked_malloc #11856

Merged
merged 1 commit into from Aug 3, 2023

Conversation

iluuu1994
Copy link
Member

This does still deviate from USE_ZEND_ALLOC=0 in that we're not rounding up the size of the allocation to fixed sizes. Doing so would suppress some out-of-bounds errors checked by ASAN. Rounding up the size in _zend_mm_block_size would not be good either as it would break code like memset(ptr, 0 _zend_mm_block_size(ptr)).

See #11758 (comment).

This does still deviate from USE_ZEND_ALLOC=0 in that we're not rounding up the
size of the allocation to fixed sizes. Doing so would suppress some
out-of-bounds errors checked by ASAN. Rounding up the size in
_zend_mm_block_size would not be good either as it would break code like
memset(ptr, 0 _zend_mm_block_size(ptr)).
@iluuu1994 iluuu1994 marked this pull request as ready for review August 2, 2023 17:27
@iluuu1994 iluuu1994 requested a review from dstogov as a code owner August 2, 2023 17:27
@iluuu1994 iluuu1994 merged commit 3148da8 into php:master Aug 3, 2023
12 checks passed
jorgsowa pushed a commit to jorgsowa/php-src that referenced this pull request Aug 16, 2023
This does still deviate from USE_ZEND_ALLOC=0 in that we're not rounding up the
size of the allocation to fixed sizes. Doing so would suppress some
out-of-bounds errors checked by ASAN. Rounding up the size in
_zend_mm_block_size would not be good either as it would break code like
memset(ptr, 0 _zend_mm_block_size(ptr)).
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.

None yet

2 participants