File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -1528,9 +1528,21 @@ static zend_always_inline zend_mm_free_slot *zend_mm_get_next_free_slot(zend_mm_
15281528
15291529#else /* ZEND_MM_HEAP_PROTECTION */
15301530# define zend_mm_set_next_free_slot (heap , bin_num , slot , next ) do { \
1531- (slot)->next_free_slot = (next); \
1531+ ZEND_MM_UNPOISON(slot, sizeof(zend_mm_free_slot*)); \
1532+ (slot)->next_free_slot = (next); \
1533+ ZEND_MM_POISON(slot, sizeof(zend_mm_free_slot*)); \
15321534 } while (0)
1533- # define zend_mm_get_next_free_slot (heap , bin_num , slot ) (slot)->next_free_slot
1535+
1536+ static zend_always_inline zend_mm_free_slot * zend_mm_get_next_free_slot (zend_mm_heap * heap , uint32_t bin_num , zend_mm_free_slot * slot )
1537+ {
1538+ ZEND_MM_UNPOISON (slot , sizeof (zend_mm_free_slot * ));
1539+
1540+ zend_mm_free_slot * next = slot -> next_free_slot ;
1541+
1542+ ZEND_MM_POISON (slot , sizeof (zend_mm_free_slot * ));
1543+
1544+ return (zend_mm_free_slot * )next ;
1545+ }
15341546#endif /* ZEND_MM_HEAP_PROTECTION */
15351547
15361548static zend_never_inline void * zend_mm_alloc_small_slow (zend_mm_heap * heap , uint32_t bin_num ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC )
You can’t perform that action at this time.
0 commit comments