Hi Stéphane,

On Wed, 2024-06-19 at 13:28 +0200, Stéphane Glondu wrote:
> > Can you maybe try passing "-malign-int" to CFLAGS/CXXFLAGS when building 
> > OCaml on m68k
> > to verify this hypothesis? Please note that this also breaks the SysV ABI, 
> > so it's not
> > possible to easily do this on a per-package basis.
> 
> I observe the same behaviour with "-malign-int": the address of 
> caml_state (a thread local variable) changes unexpectedly (goes from 
> 0x402e5fac to 0x402e7454) after the following goto:
> 
>  
> https://salsa.debian.org/ocaml-team/ocaml/-/blob/debian/experimental/runtime/interp.c?ref_type=heads#L295
> 
> which leads to:
> 
>  
> https://salsa.debian.org/ocaml-team/ocaml/-/blob/debian/experimental/runtime/interp.c?ref_type=heads#L819
> 
> ...confirmed by adding:
> 
>    fprintf(stderr, "&caml_state = %p\n", &caml_state);
> 
> before the goto and after the "Instruct(BRANCH):".

Hmm, I guess then maybe Andreas Schwab or Geert Uytterhoeven might have an idea 
what
the problem with the TLS variable is. I'll CC both.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply via email to