Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Zend/zend_call_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ typedef int boolean_t;
# include <valgrind/valgrind.h>
#endif

#if __has_feature(memory_sanitizer)
# include <sanitizer/msan_interface.h>
#endif

#ifdef ZEND_CHECK_STACK_LIMIT

/* Called once per process or thread */
Expand Down Expand Up @@ -224,6 +228,11 @@ static bool zend_call_stack_get_linux_proc_maps(zend_call_stack *stack)
}

while (fgets(buffer, sizeof(buffer), f) && sscanf(buffer, "%" SCNxPTR "-%" SCNxPTR, &start, &end) == 2) {
#if __has_feature(memory_sanitizer)
/* Are initialised above */
__msan_unpoison(&start, sizeof(start));
__msan_unpoison(&end, sizeof(end));
#endif
if (start <= addr_on_stack && end >= addr_on_stack) {
found = true;
break;
Expand Down
Loading