Index | Thread | Search

From:
Jeremy Evans <jeremy@openbsd.org>
Subject:
Re: unbreak Ruby 3.3 on arm64 BTI
To:
OpenBSD ports <ports@openbsd.org>
Date:
Fri, 21 Jun 2024 15:42:23 +0000

Download raw body.

Thread
On 06/21 04:33, Stuart Henderson wrote:
> Ruby 3.3 hits SIGILL at startup on arm64 machines with BTI (apple M2),
> ktrace shows that it is indeed BTI-related.
> 
> 3.1 and 3.2 seem OK as-is.
> 
> OK to fix it like this?

OK jeremy@

Note that Ruby 3.3 has code to handle BTI in the arm64 coroutine:
https://github.com/ruby/ruby/blob/v3_3_3/coroutine/arm64/Context.S

Hopefully someone can figure out why that doesn't work on OpenBSD,
and how to fix it, so I can work on upstreaming support (as I
upstreamed support for IBT on amd64).

Thanks,
Jeremy

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/ruby/3.3/Makefile,v
> diff -u -p -r1.7 Makefile
> --- Makefile	14 Jun 2024 19:41:34 -0000	1.7
> +++ Makefile	21 Jun 2024 15:33:16 -0000
> @@ -1,3 +1,6 @@
> +USE_NOBTCFI-aarch64 =	Yes
> +REVISION-main =		0
> +
>  VERSION =		3.3.3
>  DISTNAME =		ruby-${VERSION}
>  PKGNAME-main =		ruby-${VERSION}