ocaml/0003-Fix-x86_64-delivery-of-effect-related-exceptions.patch
Jerry James a433439c10 Version 5.1.0
Other changes:
- Add LicenseRef-Fedora-Public-Domain to the runtime License field
- New ocaml-rpm-macros subpackage
- Depend on libzstd-devel for compressed marshaling
- Disable LTO
2023-10-04 20:56:33 -06:00

35 lines
1.1 KiB
Diff

From 352789925e44f012fbddc5dfae63abd15a447577 Mon Sep 17 00:00:00 2001
From: Miod Vallat <miod@tarides.com>
Date: Mon, 4 Sep 2023 13:50:30 -0600
Subject: [PATCH 3/4] Fix x86_64 delivery of effect-related exceptions
---
runtime/amd64.S | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/runtime/amd64.S b/runtime/amd64.S
index 7e6f95c680..24dfa7111b 100644
--- a/runtime/amd64.S
+++ b/runtime/amd64.S
@@ -902,6 +902,7 @@ LBL(112):
movq Caml_state(current_stack), %rsi
SWITCH_OCAML_STACKS
/* No parent stack. Raise Effect.Unhandled. */
+ ENTER_FUNCTION
movq %rax, C_ARG_1
LEA_VAR(caml_raise_unhandled_effect, %rax)
jmp LBL(caml_c_call)
@@ -946,7 +947,8 @@ CFI_STARTPROC
UPDATE_BASE_POINTER(%rcx)
SWITCH_OCAML_STACKS
jmp *(%rbx)
-2: LEA_VAR(caml_raise_continuation_already_resumed, %rax)
+2: ENTER_FUNCTION
+ LEA_VAR(caml_raise_continuation_already_resumed, %rax)
jmp LBL(caml_c_call)
CFI_ENDPROC
ENDFUNCTION(G(caml_resume))
--
2.41.0