]> xenbits.xensource.com Git - unikraft/libs/libunwind.git/commitdiff
Remove broken patch for __unw_getcontext
authorMarco Schlumpp <marco@unikraft.io>
Mon, 20 Nov 2023 08:15:09 +0000 (09:15 +0100)
committerRazvan Deaconescu <razvan@rosedu.org>
Mon, 20 Nov 2023 17:55:05 +0000 (19:55 +0200)
The patch just skipped internal libunwind functions to work-around the missing
unwind tables in libunwind itself. This work-around caused a mismatch between
the actual stack state and what the unwind tables of the user application
expected.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
patches/0001-Save-RIP-from-previous-stack-frame.patch [deleted file]

diff --git a/patches/0001-Save-RIP-from-previous-stack-frame.patch b/patches/0001-Save-RIP-from-previous-stack-frame.patch
deleted file mode 100644 (file)
index 2011e3f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-From 6d79ff97d634cf5317492f7e80ede5b8e07bf51a Mon Sep 17 00:00:00 2001
-From: Andrei Tatar <andrei@unikraft.io>
-Date: Wed, 10 May 2023 15:21:30 +0300
-Subject: [PATCH] Save RIP from previous stack frame
-
-__unw_getcontext assumes the throwing function's return address is at
-the top of the stack; however, this does not hold in unikraft, instead
-we must go one stack frame earlier to get the right address.
-
-Co-authored-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro>
-Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro>
-Signed-off-by: Andrei Tatar <andrei@unikraft.io>
----
- libunwind/src/UnwindRegistersSave.S | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libunwind/src/UnwindRegistersSave.S b/libunwind/src/UnwindRegistersSave.S
-index b39489235..49067c021 100644
---- a/src/UnwindRegistersSave.S
-+++ b/src/UnwindRegistersSave.S
-@@ -90,7 +90,7 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext)
-   movq  %r13,104(PTR)
-   movq  %r14,112(PTR)
-   movq  %r15,120(PTR)
--  movq  (%rsp),TMP
-+  movq  8(%rbp),TMP
-   movq  TMP,128(PTR) # store return address as rip
-   # skip rflags
-   # skip cs
--- 
-2.40.1
-