summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2021-06-17 16:09:09 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2021-06-17 16:09:09 +0000
commit589b375a5b2873b5557cbcee6d217043dc02a597 (patch)
treed8f4ad8a15b1cb62d46b35b387a150b7bbde3f1e
parentc9f9db86da599ff79a4688e4e6928b3dd030622b (diff)
On OpenBSD _JBLEN is the number of slots (of type long) in jmp_buf.
We don't need 256 slots, so change it to 32 which leaves us with a few spare slots and is probably what was intended. This fixes building emacs which does some insane setjmp(3)/longjmp(3) stuff and gets upset when jmp_buf is 2048 bytes. ok deraadt@
-rw-r--r--sys/arch/riscv64/include/setjmp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/riscv64/include/setjmp.h b/sys/arch/riscv64/include/setjmp.h
index 7b246de8999..15c39636b4b 100644
--- a/sys/arch/riscv64/include/setjmp.h
+++ b/sys/arch/riscv64/include/setjmp.h
@@ -1,8 +1,8 @@
-/* $OpenBSD: setjmp.h,v 1.3 2021/05/12 01:20:52 jsg Exp $ */
+/* $OpenBSD: setjmp.h,v 1.4 2021/06/17 16:09:08 kettenis Exp $ */
/*
* machine/setjmp.h: machine dependent setjmp-related information.
*/
-#define _JBLEN 256 /* sp, ra, [f]s0-11, fscr, magic val, sigmask */
+#define _JBLEN 32 /* sp, ra, [f]s0-11, fscr, magic val, sigmask */
#define _JB_SIGMASK 28