Rename sanitizer members for clarity

These members hold the prior stack pointer and size, so bottom and capacity were poor name choices, prior_pointer and prior_size are more clear.
This commit is contained in:
Aaron Piotrowski 2021-05-08 13:12:06 -05:00
parent 68224f2a41
commit 5fb03758e5
No known key found for this signature in database
GPG key ID: ADD1EF783EDE9EEB
2 changed files with 7 additions and 7 deletions

View file

@ -185,7 +185,7 @@ static ZEND_NORETURN void zend_fiber_trampoline(transfer_t transfer)
zend_fiber_context *context = transfer.data; zend_fiber_context *context = transfer.data;
#ifdef __SANITIZE_ADDRESS__ #ifdef __SANITIZE_ADDRESS__
__sanitizer_finish_switch_fiber(NULL, &context->stack.bottom, &context->stack.capacity); __sanitizer_finish_switch_fiber(NULL, &context->stack.prior_pointer, &context->stack.prior_size);
#endif #endif
context->caller = transfer.context; context->caller = transfer.context;
@ -195,7 +195,7 @@ static ZEND_NORETURN void zend_fiber_trampoline(transfer_t transfer)
context->self = NULL; context->self = NULL;
#ifdef __SANITIZE_ADDRESS__ #ifdef __SANITIZE_ADDRESS__
__sanitizer_start_switch_fiber(NULL, context->stack.bottom, context->stack.capacity); __sanitizer_start_switch_fiber(NULL, context->stack.prior_pointer, context->stack.prior_size);
#endif #endif
jump_fcontext(context->caller, NULL); jump_fcontext(context->caller, NULL);
@ -242,7 +242,7 @@ ZEND_API void zend_fiber_switch_context(zend_fiber_context *to)
transfer_t transfer = jump_fcontext(to->self, to); transfer_t transfer = jump_fcontext(to->self, to);
#ifdef __SANITIZE_ADDRESS__ #ifdef __SANITIZE_ADDRESS__
__sanitizer_finish_switch_fiber(fake_stack, &to->stack.bottom, &to->stack.capacity); __sanitizer_finish_switch_fiber(fake_stack, &to->stack.prior_pointer, &to->stack.prior_size);
#endif #endif
to->self = transfer.context; to->self = transfer.context;
@ -254,13 +254,13 @@ ZEND_API void zend_fiber_suspend_context(zend_fiber_context *current)
#ifdef __SANITIZE_ADDRESS__ #ifdef __SANITIZE_ADDRESS__
void *fake_stack; void *fake_stack;
__sanitizer_start_switch_fiber(&fake_stack, current->stack.bottom, current->stack.capacity); __sanitizer_start_switch_fiber(&fake_stack, current->stack.prior_pointer, current->stack.prior_size);
#endif #endif
transfer_t transfer = jump_fcontext(current->caller, NULL); transfer_t transfer = jump_fcontext(current->caller, NULL);
#ifdef __SANITIZE_ADDRESS__ #ifdef __SANITIZE_ADDRESS__
__sanitizer_finish_switch_fiber(fake_stack, &current->stack.bottom, &current->stack.capacity); __sanitizer_finish_switch_fiber(fake_stack, &current->stack.prior_pointer, &current->stack.prior_size);
#endif #endif
current->caller = transfer.context; current->caller = transfer.context;

View file

@ -43,8 +43,8 @@ typedef struct _zend_fiber_stack {
#endif #endif
#ifdef __SANITIZE_ADDRESS__ #ifdef __SANITIZE_ADDRESS__
const void *bottom; const void *prior_pointer;
size_t capacity; size_t prior_size;
#endif #endif
} zend_fiber_stack; } zend_fiber_stack;