about summary refs log tree commit diff
path: root/src/ldso/sh
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2022-11-05 18:53:11 -0400
committerRich Felker <dalias@aerifal.cx>2022-11-05 18:59:53 -0400
commitad5dcd398b9509cf43672e3a7f02c4b18035998c (patch)
tree2f7681f04bac40fa57ad2c03d65bb3cebf5de247 /src/ldso/sh
parent8f9259450aa43a6fd539e428e61e2961b725fbae (diff)
downloadmusl-ad5dcd398b9509cf43672e3a7f02c4b18035998c.tar.gz
musl-ad5dcd398b9509cf43672e3a7f02c4b18035998c.tar.xz
musl-ad5dcd398b9509cf43672e3a7f02c4b18035998c.zip
fix async thread cancellation stack alignment
if async cancellation is enabled and acted upon, the stack pointer is
not necessarily pointing to a __syscall_cp_asm stack frame. the
contents of the stack being wrong don't really matter, but if the
stack pointer is not suitably aligned, the procedure call ABI is
violated when calling back into C code via __cancel, and pthread_exit,
cancellation cleanup handlers, TSD destructors, etc. may malfunction
or crash.

for the async cancel case, just call __cancel directly like we did
prior to commit 102f6a01e249ce4495f1119ae6d963a2a4a53ce5. restore the
signal mask prior to doing this since the cancellation handler runs
with all signals blocked.
Diffstat (limited to 'src/ldso/sh')
0 files changed, 0 insertions, 0 deletions