Re: Help needed for debugging OCaml failure on m68k

2024-06-24 Thread Stéphane Glondu
Hi Adrian, Le 22/06/2024 à 10:17, John Paul Adrian Glaubitz a écrit : I noticed that &caml_state changes when pc changes. Looking further, pc is a register variable pinned to a5. I guess this conflicts with the implementation of TLS...? I've removed the register pin and launched a build, and it

Re: Help needed for debugging OCaml failure on m68k

2024-06-22 Thread John Paul Adrian Glaubitz
Hi Stéphane, On Wed, 2024-06-19 at 14:45 +0200, Stéphane Glondu wrote: > I noticed that &caml_state changes when pc changes. Looking further, pc > is a register variable pinned to a5. I guess this conflicts with the > implementation of TLS...? > > I've removed the register pin and launched a bu

Re: Help needed for debugging OCaml failure on m68k

2024-06-19 Thread John Paul Adrian Glaubitz
On Wed, 2024-06-19 at 14:45 +0200, Stéphane Glondu wrote: > > 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. > > I noticed that &caml_state changes when pc changes. Looking further, pc > is a regist

Re: Help needed for debugging OCaml failure on m68k

2024-06-19 Thread Stéphane Glondu
Hi Adrian and all, Le 19/06/2024 à 14:04, John Paul Adrian Glaubitz a écrit : [...] 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/run

Re: Help needed for debugging OCaml failure on m68k

2024-06-19 Thread John Paul Adrian Glaubitz
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

Re: Help needed for debugging OCaml failure on m68k

2024-06-19 Thread Stéphane Glondu
Le 19/06/2024 à 12:45, John Paul Adrian Glaubitz a écrit : To reproduce the problem quickly: - unpack ocaml 5.2.0 source package - ./configure --enable-imprecise-c99-float-ops - make coldstart Is there some subtlety with thread local variables on m68k? Can you please try reproduce the issue on

Re: Help needed for debugging OCaml failure on m68k

2024-06-19 Thread John Paul Adrian Glaubitz
Hi Stéphane, On Wed, 2024-06-19 at 12:37 +0200, Stéphane Glondu wrote: > Le 19/06/2024 à 09:06, John Paul Adrian Glaubitz a écrit : > > > To reproduce the problem quickly: > > > - unpack ocaml 5.2.0 source package > > > - ./configure --enable-imprecise-c99-float-ops > > > - make coldstart > > > >

Re: Help needed for debugging OCaml failure on m68k

2024-06-19 Thread Stéphane Glondu
Hi, Le 19/06/2024 à 09:06, John Paul Adrian Glaubitz a écrit : To reproduce the problem quickly: - unpack ocaml 5.2.0 source package - ./configure --enable-imprecise-c99-float-ops - make coldstart Is there some subtlety with thread local variables on m68k? Can you please try reproduce the iss

Re: Help needed for debugging OCaml failure on m68k

2024-06-19 Thread John Paul Adrian Glaubitz
Hi Stéphane, On Wed, 2024-06-19 at 08:21 +0200, Stéphane Glondu wrote: > OCaml 5.2.0 FTBFS on m68k: > > > https://buildd.debian.org/status/fetch.php?pkg=ocaml&arch=m68k&ver=5.2.0-1%7Eexp1&stamp=1718285451&raw=0 > > The failure happens very early, at the very first run of the bytecode > interp

Help needed for debugging OCaml failure on m68k

2024-06-18 Thread Stéphane Glondu
Hi all, OCaml 5.2.0 FTBFS on m68k: https://buildd.debian.org/status/fetch.php?pkg=ocaml&arch=m68k&ver=5.2.0-1%7Eexp1&stamp=1718285451&raw=0 The failure happens very early, at the very first run of the bytecode interpreter (ocamlrun). It seems to be related to a thread local variable that mov