mirror of
git://git.musl-libc.org/musl
synced 2025-01-18 21:01:01 +00:00
work around mips detached thread exit breakage due to kernel regression
linux kernel commit 46e12c07b3b9603c60fc1d421ff18618241cb081 caused the mips syscall mechanism to fail with EFAULT when the userspace stack pointer is invalid, breaking __unmapself used for detached thread exit. the workaround is to set $sp to a known-valid, readable address, and the simplest one to obtain is the address of the current function, which is available (per o32 calling convention) in $25.
This commit is contained in:
parent
75eceb3ae8
commit
ce3688eca9
@ -2,6 +2,7 @@
|
||||
.global __unmapself
|
||||
.type __unmapself,@function
|
||||
__unmapself:
|
||||
move $sp, $25
|
||||
li $2, 4091
|
||||
syscall
|
||||
li $4, 0
|
||||
|
Loading…
Reference in New Issue
Block a user