Skip to content

Commit 5fb0375

Browse files
committed
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.
1 parent 68224f2 commit 5fb0375

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Zend/zend_fibers.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static ZEND_NORETURN void zend_fiber_trampoline(transfer_t transfer)
185185
zend_fiber_context *context = transfer.data;
186186

187187
#ifdef __SANITIZE_ADDRESS__
188-
__sanitizer_finish_switch_fiber(NULL, &context->stack.bottom, &context->stack.capacity);
188+
__sanitizer_finish_switch_fiber(NULL, &context->stack.prior_pointer, &context->stack.prior_size);
189189
#endif
190190

191191
context->caller = transfer.context;
@@ -195,7 +195,7 @@ static ZEND_NORETURN void zend_fiber_trampoline(transfer_t transfer)
195195
context->self = NULL;
196196

197197
#ifdef __SANITIZE_ADDRESS__
198-
__sanitizer_start_switch_fiber(NULL, context->stack.bottom, context->stack.capacity);
198+
__sanitizer_start_switch_fiber(NULL, context->stack.prior_pointer, context->stack.prior_size);
199199
#endif
200200

201201
jump_fcontext(context->caller, NULL);
@@ -242,7 +242,7 @@ ZEND_API void zend_fiber_switch_context(zend_fiber_context *to)
242242
transfer_t transfer = jump_fcontext(to->self, to);
243243

244244
#ifdef __SANITIZE_ADDRESS__
245-
__sanitizer_finish_switch_fiber(fake_stack, &to->stack.bottom, &to->stack.capacity);
245+
__sanitizer_finish_switch_fiber(fake_stack, &to->stack.prior_pointer, &to->stack.prior_size);
246246
#endif
247247

248248
to->self = transfer.context;
@@ -254,13 +254,13 @@ ZEND_API void zend_fiber_suspend_context(zend_fiber_context *current)
254254

255255
#ifdef __SANITIZE_ADDRESS__
256256
void *fake_stack;
257-
__sanitizer_start_switch_fiber(&fake_stack, current->stack.bottom, current->stack.capacity);
257+
__sanitizer_start_switch_fiber(&fake_stack, current->stack.prior_pointer, current->stack.prior_size);
258258
#endif
259259

260260
transfer_t transfer = jump_fcontext(current->caller, NULL);
261261

262262
#ifdef __SANITIZE_ADDRESS__
263-
__sanitizer_finish_switch_fiber(fake_stack, &current->stack.bottom, &current->stack.capacity);
263+
__sanitizer_finish_switch_fiber(fake_stack, &current->stack.prior_pointer, &current->stack.prior_size);
264264
#endif
265265

266266
current->caller = transfer.context;

Zend/zend_fibers.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ typedef struct _zend_fiber_stack {
4343
#endif
4444

4545
#ifdef __SANITIZE_ADDRESS__
46-
const void *bottom;
47-
size_t capacity;
46+
const void *prior_pointer;
47+
size_t prior_size;
4848
#endif
4949
} zend_fiber_stack;
5050

0 commit comments

Comments
 (0)