Re: unbreak Ruby 3.3 on arm64 BTI

2024-06-21 Thread Jeremy Evans
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 -  1.7
> +++ Makefile  21 Jun 2024 15:33:16 -
> @@ -1,3 +1,6 @@
> +USE_NOBTCFI-aarch64 =Yes
> +REVISION-main =  0
> +
>  VERSION =3.3.3
>  DISTNAME =   ruby-${VERSION}
>  PKGNAME-main =   ruby-${VERSION}



unbreak Ruby 3.3 on arm64 BTI

2024-06-21 Thread Stuart Henderson
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?


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