liblaunch: ensure stack pointers remain aligned
This commit is contained in:
@@ -24,6 +24,9 @@ void *stack_writer_put_string(
|
||||
w->w_local_sp -= (len + 1);
|
||||
w->w_remote_sp -= (len + 1);
|
||||
|
||||
w->w_local_sp &= ~0x0F;
|
||||
w->w_remote_sp &= ~0x0F;
|
||||
|
||||
char *local_ptr = (char *)w->w_local_sp;
|
||||
virt_addr_t remote_ptr = w->w_remote_sp;
|
||||
|
||||
@@ -46,6 +49,9 @@ void *stack_writer_put(
|
||||
w->w_local_sp -= len;
|
||||
w->w_remote_sp -= len;
|
||||
|
||||
w->w_local_sp &= ~0x0F;
|
||||
w->w_remote_sp &= ~0x0F;
|
||||
|
||||
void *local_ptr = (char *)w->w_local_sp;
|
||||
virt_addr_t remote_ptr = w->w_remote_sp;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user