From 43d1169a91ac0017c1e9996c744861e27faa34cc Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 10 Aug 2023 09:18:01 -0400 Subject: [PATCH] Mitigate risk of the lack of sufficient register clobbers. --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 839aef3..cd796a0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -288,6 +288,7 @@ extern "C" { /// Covers the usual use case for setjmp: it invokes the callback, and the code /// of the callback can use longjmp to exit early from the call_with_setjmp. +#[inline(never)] // see https://github.com/pnkfelix/cee-scape/issues/14 pub fn call_with_setjmp(mut callback: F) -> c_int where F: for<'a> FnOnce(&'a JmpBufFields) -> c_int, @@ -352,6 +353,7 @@ where /// Covers the usual use case for sigsetjmp: it invokes the callback, and the code /// of the callback can use siglongjmp to exit early from the call_with_sigsetjmp. +#[inline(never)] // see https://github.com/pnkfelix/cee-scape/issues/14 pub fn call_with_sigsetjmp(savemask: bool, mut callback: F) -> c_int where F: for<'a> FnOnce(&'a SigJmpBufFields) -> c_int,