Skip to content

Commit

Permalink
musl: Add unwind protection to aarch64 clone() implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrp committed Nov 8, 2024
1 parent 752bfe5 commit 7410c74
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/libc/musl/src/thread/aarch64/clone.s
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
.hidden __clone
.type __clone,%function
__clone:
.cfi_startproc

// align stack and save func,arg
and x1,x1,#-16
stp x0,x3,[x1,#-16]!
Expand All @@ -24,7 +26,12 @@ __clone:
// parent
ret
// child
1: ldp x1,x0,[sp],#16
1: .cfi_undefined lr
mov fp, 0

ldp x1,x0,[sp],#16
blr x1
mov x8,#93 // SYS_exit
svc #0

.cfi_endproc

0 comments on commit 7410c74

Please sign in to comment.