Re: Help needed for debugging OCaml failure on m68k

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.debian.ports.68k
Message-ID <284e24597ed342cd318f1f2334b82758b6411df4.camel@physik.fu-berlin.de>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.