From b6b81f697b38ef915a5dbf1311baba164822e917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Thu, 12 Dec 2024 17:56:04 +0100 Subject: clone: clear the frame pointer in the child process on relevant ports This just mirrors what is done in the start code for the affected ports, as well as what is already done for the three x86 ports. Clearing the frame pointer helps protect FP-based unwinders from wrongly attempting to traverse into the parent thread's call frame stack. --- src/thread/arm/clone.s | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/thread/arm/clone.s') diff --git a/src/thread/arm/clone.s b/src/thread/arm/clone.s index bb0965da..4ff0c0e8 100644 --- a/src/thread/arm/clone.s +++ b/src/thread/arm/clone.s @@ -19,7 +19,8 @@ __clone: ldmfd sp!,{r4,r5,r6,r7} bx lr -1: mov r0,r6 +1: mov fp,#0 + mov r0,r6 bl 3f 2: mov r7,#1 svc 0 -- cgit v1.2.1