File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 79
79
#include <limits.h>
80
80
#include <fcntl.h>
81
81
#include <errno.h>
82
+ #ifdef __SANITIZE_ADDRESS__
83
+ # include <sanitizer/asan_interface.h>
84
+ #endif
82
85
83
86
#ifndef _WIN32
84
87
# include <sys/mman.h>
@@ -724,6 +727,9 @@ static void *zend_mm_chunk_alloc_int(size_t size, size_t alignment)
724
727
if (zend_mm_use_huge_pages ) {
725
728
zend_mm_hugepage (ptr , size );
726
729
}
730
+ #ifdef __SANITIZE_ADDRESS__
731
+ ASAN_UNPOISON_MEMORY_REGION (ptr , size );
732
+ #endif
727
733
return ptr ;
728
734
} else {
729
735
size_t offset ;
@@ -763,6 +769,9 @@ static void *zend_mm_chunk_alloc_int(size_t size, size_t alignment)
763
769
if (zend_mm_use_huge_pages ) {
764
770
zend_mm_hugepage (ptr , size );
765
771
}
772
+ # ifdef __SANITIZE_ADDRESS__
773
+ ASAN_UNPOISON_MEMORY_REGION (ptr , size );
774
+ # endif
766
775
#endif
767
776
return ptr ;
768
777
}
You can’t perform that action at this time.
0 commit comments