bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63365: bug#65727: 30.0.50; Build failure in MSYS2 when --with-native


From: Andrea Corallo
Subject: bug#63365: bug#65727: 30.0.50; Build failure in MSYS2 when --with-native-compilation
Date: Tue, 14 May 2024 16:33:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Cyril Arnould <cyril.arnould@outlook.com> writes:

> I believe the problem is centered around the mark_threads function (in
> thread.c). I still have no idea if the issue is with emacs or GCC, but
> I hope this helps narrow it down.
>
> I found it by trying to suppress the sibling call optimization through
> printf statements at the end of every function that showed differences
> between the objdump files. With the additional printf calls, the
> native-compilation build works together with the
> -foptimize-sibling-calls flag.
>
> After that, it was just a matter of narrowing it down. You can try it
> for yourself with the following patch:
>
> diff --git a/src/thread.c b/src/thread.c
> index 040ca39511e..b522d146779 100644
> --- a/src/thread.c
> +++ b/src/thread.c
> @@ -696,6 +696,7 @@ mark_threads_callback (void *ignore)
>  mark_threads (void)
>  {
>    flush_stack_call_func (mark_threads_callback, NULL);
> +  printf("");
>  }
>
>  void
>
> Note that by now I've moved on to emacs-29.3 on GCC 14, however it
> seems that the issue is still exactly the same.

Interesting, would you mind instead of using 'printf' to try using
'__attribute__((optimize("O0")))' on the function to verify that the
issue is really an optimization?

Thanks

  Andrea





reply via email to

[Prev in Thread] Current Thread [Next in Thread]