Skip to content
Merged
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
6 changes: 5 additions & 1 deletion Zend/zend_call_stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
# include <pthread.h>
#endif

#ifdef _MSC_VER
#include <intrin.h>
#endif

#ifdef ZEND_CHECK_STACK_LIMIT

typedef struct _zend_call_stack {
Expand All @@ -38,7 +42,7 @@ ZEND_API bool zend_call_stack_get(zend_call_stack *stack);

/** Returns an approximation of the current stack position */
static zend_always_inline void *zend_call_stack_position(void) {
#ifdef ZEND_WIN32
#ifdef _MSC_VER
return _AddressOfReturnAddress();
#elif defined(PHP_HAVE_BUILTIN_FRAME_ADDRESS)
return __builtin_frame_address(0);
Expand Down
Loading