unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Cyril Arnould <cyril.arnould@outlook.com>
To: Andrea Corallo <acorallo@gnu.org>
Cc: "63365@debbugs.gnu.org" <63365@debbugs.gnu.org>,
	"eliz@gnu.org" <eliz@gnu.org>,
	65727@debbugs.gnu.org, "Arash Esbati" <arash@gnu.org>,
	"András Svraka" <svraka.andras@gmail.com>
Subject: bug#65727: 30.0.50; Build failure in MSYS2 when --with-native-compilation
Date: Wed, 15 May 2024 18:35:54 +0200	[thread overview]
Message-ID: <AS4PR10MB61102245BA5A29AA4D51570CF0EC2@AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <yp11q63a8ba.fsf@fencepost.gnu.org>

[-- Attachment #1: Type: text/plain, Size: 8399 bytes --]

 > Mmmh 🧐, must say it does not make much sense to me.  Are we sure these
 > results are reliably reproducible and we are not looking at some
 > statistic fluctuation of a non very reproducible issue?

I understand your scepticism. However, I've ran every build 2-4 times,
and so far my reproducibility is at 100%. As in; with the same
configuration the build (as a whole) either always fails or is always
successful. It does seem random however which of the byte-compile
steps fail in the end. Maybe the -fno-optimize-sibling-calls just
makes the failure much more unlikely.

 > Anyway if marking 'mark_threads' with
 > __attribute__((optimize("no-optimize-sibling-calls"))) solves the issue
 > in a stable way I think we should compare the assembly output of the two
 > functions.

I've attached the corresponding objdump -S -d (including the original
.o files). This time I've modified thread.c so that 'mark_threads'
comes dead last. I ran the builds another 4 times each to make
sure. Moving the function in the source also moves it to the end of
the dumps, makes for easier diffing:

diff -ubBw thread.txt thread-attr-no-optimize-sibling-calls.txt
--- thread.txt  2024-05-15 17:59:49.003434900 +0200
+++ thread-attr-no-optimize-sibling-calls.txt   2024-05-15 
17:38:35.029292300 +0200
@@ -1,5 +1,5 @@

-../thread-last.o:     file format pe-x86-64
+../thread-attr-last.o:     file format pe-x86-64


  Disassembly of section .text:
@@ -2305,6 +2305,7 @@

  00000000000017d0 <mark_threads>:

+__attribute__((optimize("no-optimize-sibling-calls")))
  void
  mark_threads (void)
  {
@@ -2316,50 +2317,49 @@
      17d9:      57                      push   %rdi
      17da:      56                      push   %rsi
      17db:      53                      push   %rbx
-    17dc:      48 81 ec a8 00 00 00    sub    $0xa8,%rsp
-    17e3:      48 8d 2c 24             lea    (%rsp),%rbp
-    17e7:      0f 11 75 00             movups %xmm6,0x0(%rbp)
-    17eb:      0f 11 7d 10             movups %xmm7,0x10(%rbp)
-    17ef:      44 0f 11 45 20          movups %xmm8,0x20(%rbp)
-    17f4:      44 0f 11 4d 30          movups %xmm9,0x30(%rbp)
-    17f9:      44 0f 11 55 40          movups %xmm10,0x40(%rbp)
-    17fe:      44 0f 11 5d 50          movups %xmm11,0x50(%rbp)
-    1803:      44 0f 11 65 60          movups %xmm12,0x60(%rbp)
-    1808:      44 0f 11 6d 70          movups %xmm13,0x70(%rbp)
-    180d:      44 0f 11 b5 80 00 00    movups %xmm14,0x80(%rbp)
-    1814:      00
-    1815:      44 0f 11 bd 90 00 00    movups %xmm15,0x90(%rbp)
-    181c:      00
+    17dc:      48 81 ec c8 00 00 00    sub    $0xc8,%rsp
+    17e3:      48 8d 6c 24 20          lea    0x20(%rsp),%rbp
+    17e8:      0f 11 75 00             movups %xmm6,0x0(%rbp)
+    17ec:      0f 11 7d 10             movups %xmm7,0x10(%rbp)
+    17f0:      44 0f 11 45 20          movups %xmm8,0x20(%rbp)
+    17f5:      44 0f 11 4d 30          movups %xmm9,0x30(%rbp)
+    17fa:      44 0f 11 55 40          movups %xmm10,0x40(%rbp)
+    17ff:      44 0f 11 5d 50          movups %xmm11,0x50(%rbp)
+    1804:      44 0f 11 65 60          movups %xmm12,0x60(%rbp)
+    1809:      44 0f 11 6d 70          movups %xmm13,0x70(%rbp)
+    180e:      44 0f 11 b5 80 00 00    movups %xmm14,0x80(%rbp)
+    1815:      00
+    1816:      44 0f 11 bd 90 00 00    movups %xmm15,0x90(%rbp)
+    181d:      00
    flush_stack_call_func1 (func, arg);
-    181d:      31 d2                   xor    %edx,%edx
-    181f:      48 8d 0d da eb ff ff    lea -0x1426(%rip),%rcx        # 
400 <mark_threads_callback>
+    181e:      31 d2                   xor    %edx,%edx
+    1820:      48 8d 0d d9 eb ff ff    lea -0x1427(%rip),%rcx        # 
400 <mark_threads_callback>
+    1827:      e8 00 00 00 00          call   182c <mark_threads+0x5c>
+    182c:      90                      nop
    flush_stack_call_func (mark_threads_callback, NULL);
  }
-    1826:      0f 10 75 00             movups 0x0(%rbp),%xmm6
-    182a:      0f 10 7d 10             movups 0x10(%rbp),%xmm7
-    182e:      44 0f 10 45 20          movups 0x20(%rbp),%xmm8
-    1833:      44 0f 10 4d 30          movups 0x30(%rbp),%xmm9
-    1838:      44 0f 10 55 40          movups 0x40(%rbp),%xmm10
-    183d:      44 0f 10 5d 50          movups 0x50(%rbp),%xmm11
-    1842:      44 0f 10 65 60          movups 0x60(%rbp),%xmm12
-    1847:      44 0f 10 6d 70          movups 0x70(%rbp),%xmm13
-    184c:      44 0f 10 b5 80 00 00    movups 0x80(%rbp),%xmm14
-    1853:      00
-    1854:      44 0f 10 bd 90 00 00    movups 0x90(%rbp),%xmm15
-    185b:      00
-    185c:      48 81 c4 a8 00 00 00    add    $0xa8,%rsp
-    1863:      5b                      pop    %rbx
-    1864:      5e                      pop    %rsi
-    1865:      5f                      pop    %rdi
-    1866:      41 5c                   pop    %r12
-    1868:      41 5d                   pop    %r13
-    186a:      41 5e                   pop    %r14
-    186c:      41 5f                   pop    %r15
-    186e:      5d                      pop    %rbp
-    186f:      e9 00 00 00 00          jmp    1874 <mark_threads+0xa4>
-    1874:      90                      nop
-    1875:      90                      nop
-    1876:      90                      nop
+    182d:      0f 10 75 00             movups 0x0(%rbp),%xmm6
+    1831:      0f 10 7d 10             movups 0x10(%rbp),%xmm7
+    1835:      44 0f 10 45 20          movups 0x20(%rbp),%xmm8
+    183a:      44 0f 10 4d 30          movups 0x30(%rbp),%xmm9
+    183f:      44 0f 10 55 40          movups 0x40(%rbp),%xmm10
+    1844:      44 0f 10 5d 50          movups 0x50(%rbp),%xmm11
+    1849:      44 0f 10 65 60          movups 0x60(%rbp),%xmm12
+    184e:      44 0f 10 6d 70          movups 0x70(%rbp),%xmm13
+    1853:      44 0f 10 b5 80 00 00    movups 0x80(%rbp),%xmm14
+    185a:      00
+    185b:      44 0f 10 bd 90 00 00    movups 0x90(%rbp),%xmm15
+    1862:      00
+    1863:      48 81 c4 c8 00 00 00    add    $0xc8,%rsp
+    186a:      5b                      pop    %rbx
+    186b:      5e                      pop    %rsi
+    186c:      5f                      pop    %rdi
+    186d:      41 5c                   pop    %r12
+    186f:      41 5d                   pop    %r13
+    1871:      41 5e                   pop    %r14
+    1873:      41 5f                   pop    %r15
+    1875:      5d                      pop    %rbp
+    1876:      c3                      ret
      1877:      90                      nop
      1878:      90                      nop
      1879:      90                      nop


[-- Attachment #2: objdump.tar.gz --]
[-- Type: application/x-gzip, Size: 743990 bytes --]

  reply	other threads:[~2024-05-15 16:35 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08  8:16 bug#63365: 30.0.50; GCC 13.1 breaks building Emacs with native-compilation Arash Esbati
2023-05-08 11:48 ` Eli Zaretskii
2023-05-08 14:36   ` Arash Esbati
2023-05-08 15:13     ` Eli Zaretskii
2023-05-08 19:34       ` Arash Esbati
2023-05-09  5:05         ` Eli Zaretskii
2023-05-09 12:12           ` Arash Esbati
2023-05-09 12:49             ` Eli Zaretskii
2023-05-10 12:37               ` Arash Esbati
2023-05-10 12:48                 ` Eli Zaretskii
2023-05-10 14:27                   ` Arash Esbati
2023-05-10 16:54                     ` Eli Zaretskii
2023-05-10 19:08                       ` Eli Zaretskii
2023-05-11 10:06                         ` Eli Zaretskii
2024-01-26 13:11                           ` Eli Zaretskii
2024-01-26 18:24                             ` Arash Esbati
2024-01-26 18:59                               ` Eli Zaretskii
2024-01-26 20:33                                 ` Arash Esbati
2024-02-01 10:39                                   ` Arash Esbati
2024-02-01 11:02                                     ` Eli Zaretskii
2024-02-01 11:11                                       ` Arash Esbati
2024-02-01 11:27                                         ` Eli Zaretskii
2023-05-26 13:05                         ` Arash Esbati
2023-05-26 13:42                           ` Eli Zaretskii
2023-05-26 19:21                             ` Arash Esbati
2023-05-27  6:00                               ` Eli Zaretskii
2023-05-27 10:57                                 ` Arash Esbati
2023-05-27 11:33                                   ` Eli Zaretskii
2023-05-27 17:35                                     ` Arash Esbati
2023-05-28  6:55                                       ` Eli Zaretskii
2023-06-01  7:31                                         ` András Svraka
2023-06-01  7:37                                           ` András Svraka
2023-06-01  8:42                                             ` Eli Zaretskii
2023-06-01  8:49                                               ` Andrea Corallo
2023-06-01 15:33                                                 ` András Svraka
2023-06-01 15:30                                               ` András Svraka
2023-06-01 16:25                                                 ` Eli Zaretskii
2023-06-08 10:21                                         ` Arash Esbati
2023-06-08 13:19                                           ` Eli Zaretskii
2023-06-08 14:02                                             ` Andrea Corallo
2023-06-08 14:18                                               ` Eli Zaretskii
2023-06-08 14:39                                                 ` Andrea Corallo
2023-06-08 22:08                                             ` Arash Esbati
2023-06-08 22:27                                         ` Arash Esbati
2023-06-16  9:04 ` Cyril Arnould
2023-06-16 10:31   ` Eli Zaretskii
2023-06-16 14:49     ` Andrea Corallo
2023-06-16 14:52       ` Andrea Corallo
2023-06-22 20:34   ` Arash Esbati
2023-06-23  5:32     ` Eli Zaretskii
2023-06-23 11:41       ` Arash Esbati
2023-06-23 12:15         ` Eli Zaretskii
2023-06-23 12:50           ` Arash Esbati
2023-06-24  9:17           ` Deus Max
2023-06-24  9:21             ` Eli Zaretskii
2023-06-24 14:41               ` Deus Max
2023-06-24 15:05                 ` Eli Zaretskii
2023-06-25 13:51       ` Andrea Corallo
2023-06-25 15:41         ` Eli Zaretskii
2023-06-25 18:11           ` Andrea Corallo
2023-06-25 18:31             ` Eli Zaretskii
2023-06-26  7:03               ` Andrea Corallo
2023-06-26 22:04 ` Cyril Arnould
2023-06-27  2:30   ` Eli Zaretskii
2023-06-27 19:28 ` Cyril Arnould
2023-06-27 20:22   ` Andrea Corallo
2024-05-14 19:52     ` Cyril Arnould
2024-05-14 20:33       ` bug#63365: bug#65727: 30.0.50; Build failure in MSYS2 when --with-native-compilation Andrea Corallo
2024-05-14 23:29         ` Cyril Arnould
2024-05-15  6:38           ` Andrea Corallo
2024-05-15 16:35             ` Cyril Arnould [this message]
2024-05-15 17:09               ` bug#63365: " Andrea Corallo
2024-05-15 18:45                 ` Cyril Arnould
2024-05-16 13:59                   ` bug#63365: " Andrea Corallo
2024-05-16 20:08                     ` Cyril Arnould
2024-05-17  4:42                       ` Andrea Corallo
2024-05-17 12:06                         ` Andrea Corallo
2024-05-17 13:03                           ` bug#65727: " Eli Zaretskii
2024-05-17 17:28                             ` Andrea Corallo
2024-05-18  7:09                               ` bug#63365: " Andrea Corallo
2024-05-18  9:53                                 ` Cyril Arnould
2024-05-18 17:30                                   ` bug#63365: " Andrea Corallo
2023-06-28 11:37   ` bug#63365: 30.0.50; GCC 13.1 breaks building Emacs with native-compilation Eli Zaretskii
2023-06-28 23:16 ` Cyril Arnould
2023-06-29  5:20   ` Eli Zaretskii
2023-06-29  6:36 ` Cyril Arnould
2023-06-29  8:21   ` Andrea Corallo
2023-06-29  9:16     ` bug#63365: AW: " Cyril Arnould
  -- strict thread matches above, loose matches on Subject: below --
2023-09-04  5:06 bug#65727: 30.0.50; Build failure in MSYS2 when --with-native-compilation voi dfoo
2023-09-04 12:29 ` Eli Zaretskii
2023-09-04 15:42   ` voi dfoo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AS4PR10MB61102245BA5A29AA4D51570CF0EC2@AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM \
    --to=cyril.arnould@outlook.com \
    --cc=63365@debbugs.gnu.org \
    --cc=65727@debbugs.gnu.org \
    --cc=acorallo@gnu.org \
    --cc=arash@gnu.org \
    --cc=eliz@gnu.org \
    --cc=svraka.andras@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).