$OpenBSD: patch-v8_src_trap-handler_handler-inside-posix_cc,v 1.5 2021/04/16 18:15:07 robert Exp $

Index: v8/src/trap-handler/handler-inside-posix.cc
--- v8/src/trap-handler/handler-inside-posix.cc.orig
+++ v8/src/trap-handler/handler-inside-posix.cc
@@ -48,8 +48,12 @@ bool IsKernelGeneratedSignal(siginfo_t* info) {
   // si_code at its default of 0 for signals that don’t originate in hardware.
   // The other conditions are only relevant for Linux.
   return info->si_code > 0 && info->si_code != SI_USER &&
-         info->si_code != SI_QUEUE && info->si_code != SI_TIMER &&
-         info->si_code != SI_ASYNCIO && info->si_code != SI_MESGQ;
+         info->si_code != SI_QUEUE && info->si_code != SI_TIMER
+#ifdef V8_OS_OPENBSD
+         ;
+#else
+         && info->si_code != SI_ASYNCIO && info->si_code != SI_MESGQ;
+#endif
 }
 
 class SigUnmaskStack {
@@ -114,6 +118,8 @@ bool TryHandleSignal(int signum, siginfo_t* info, void
     auto* context_ip = &uc->uc_mcontext->__ss.__rip;
 #elif V8_OS_FREEBSD && V8_TARGET_ARCH_X64
     auto* context_ip = &uc->uc_mcontext.mc_rip;
+#elif V8_OS_OPENBSD && V8_TARGET_ARCH_X64
+    auto* context_ip = &uc->sc_rip;
 #else
 #error Unsupported platform
 #endif
