unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eval EXEC <execvy@gmail.com>
To: Pip Cet <pipcet@protonmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: [scratch/igc] 985247b6bee crash on Linux, KDE, Wayland
Date: Thu, 05 Sep 2024 19:26:17 +0800	[thread overview]
Message-ID: <87tteu2vfq.fsf@gmail.com> (raw)
In-Reply-To: <87h6aus5yz.fsf@protonmail.com> (Pip Cet's message of "Thu, 05 Sep 2024 11:19:35 +0000")

Pip Cet <pipcet@protonmail.com> writes:

> "Eval EXEC" <execvy@gmail.com> writes:
>
>> Pip Cet <pipcet@protonmail.com> writes:
>>
>>> "Eval EXEC" <execvy@gmail.com> writes:
>>>
>>>> Hello,
>>>> I'm helping to test scratch/igc branch, commit: 985247b6bee
>>>
>>> Thanks for the reports!
>>>
>>>> I build emacs by:
>>>> ```
>>>> make extraclean
>>>> ./autogen.sh \
>>>>   && ./configure CFLAGS='-O3 -mtune=native -march=native' \
>>>>   --prefix=$(realpath ../emacs-build/$(git branch --show-current | sed 's/\//_/g'))\
>>>>   --with-mps=yes \
>>>>   --with-imagemagick  \
>>>>   --with-modules \
>>>>   --without-compress-install \
>>>>   --with-native-compilation  --with-mailutils\
>>>>   --enable-link-time-optimization \
>>>>   --with-tree-sitter --with-xinput2  \
>>>>   --with-dbus  --with-native-compilation=aot \
>>>>   --with-file-notification=inotify\
>>>>   && make -j30 install
>>>> ```
>>>
>>> What's your CPU, and which compiler is in use?  "-march=native" means
>>> "optimize for the current CPU", so it's difficult to reproduce crashes
>>> without that knowledge.
>>
>> I'm useing CPU: 13th Gen Intel(R) Core(TM) i9-13900H (20) @ 5.40 GHz
>
> Thanks!  Which gcc version are you using?  Does anyone know how to
> translate -march=native on that machine to an explicit
> -march=... argument?

My gcc version is : gcc (GCC) 13.2.0



>>> I'd recommend these CFLAGS:
>>>
>>> -g3 -ggdb -fno-omit-frame-pointer
>>>
>>> in addition to what you have.
>>
>> Thank you, now I'm going to compile scratch/igc branch by these CFLAGS.
>>
>>> Can you disassemble 'copy_font_spec' and 'Flist' by running:
>>>
>>> $ gdb /path/to/emacs
>>> (gdb) disass copy_font_spec
>>> (gdb) disass Flist
>>
>> Sorry, I have deleted the core dump file and the emacs binary.
>
> Can you disassemble them in the new emacs binary, that you're building
> now?  I realize it's possible the code will be different due to the
> different CFLAGS, but as the crash happened with -fno-omit-frame-pointer
> there might be something else going on...

emacs on  scratch/igc via ❄️   impure
❯ gdb ../emacs-build/scratch_igc/bin/emacs
GNU gdb (GDB) 14.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ../emacs-build/scratch_igc/bin/emacs...
(gdb) disass copy_font_spec
Dump of assembler code for function copy_font_spec:
Address range 0x626760 to 0x62695e:
   0x0000000000626760 <+0>:     push   %rbp
   0x0000000000626761 <+1>:     lea    -0x5(%rdi),%eax
   0x0000000000626764 <+4>:     mov    %rsp,%rbp
   0x0000000000626767 <+7>:     push   %r15
   0x0000000000626769 <+9>:     push   %r14
   0x000000000062676b <+11>:    push   %r13
   0x000000000062676d <+13>:    push   %r12
   0x000000000062676f <+15>:    push   %rbx
   0x0000000000626770 <+16>:    mov    %rdi,%rbx
   0x0000000000626773 <+19>:    sub    $0x18,%rsp
   0x0000000000626777 <+23>:    test   $0x7,%al
   0x0000000000626779 <+25>:    jne    0x42d482 <copy_font_spec.cold>
   0x000000000062677f <+31>:    mov    0x3(%rdi),%rdx
   0x0000000000626783 <+35>:    lea    -0x5(%rdi),%r13
   0x0000000000626787 <+39>:    movabs $0x400000003f000000,%r12
   0x0000000000626791 <+49>:    movabs $0x4000000025000000,%rax
   0x000000000062679b <+59>:    and    %r12,%rdx
   0x000000000062679e <+62>:    cmp    %rax,%rdx
   0x00000000006267a1 <+65>:    jne    0x42d482 <copy_font_spec.cold>
   0x00000000006267a7 <+71>:    mov    0x1e3a8a(%rip),%rax        # 0x80a238 <current_thread>
   0x00000000006267ae <+78>:    mov    $0x8,%esi
   0x00000000006267b3 <+83>:    mov    $0x78,%edi
   0x00000000006267b8 <+88>:    mov    0x210(%rax),%rax
   0x00000000006267bf <+95>:    mov    0x20(%rax),%rdx
   0x00000000006267c3 <+99>:    call   0x69a920 <alloc_impl>
--Type <RET> for more, q to quit, c to continue without paging--c
   0x00000000006267c8 <+104>:   mov    %rax,%r14
   0x00000000006267cb <+107>:   movabs $0x400000002500000d,%rax
   0x00000000006267d5 <+117>:   mov    %rax,0x8(%r14)
   0x00000000006267d9 <+121>:   lea    0x70(%r14),%r15
   0x00000000006267dd <+125>:   movq   $0x0,0x70(%r14)
   0x00000000006267e5 <+133>:   movq   $0x0,0x10(%r14)
   0x00000000006267ed <+141>:   movdqu 0x13(%rbx),%xmm2
   0x00000000006267f2 <+146>:   movups %xmm2,0x18(%r14)
   0x00000000006267f7 <+151>:   movdqu 0x23(%rbx),%xmm3
   0x00000000006267fc <+156>:   movups %xmm3,0x28(%r14)
   0x0000000000626801 <+161>:   movdqu 0x33(%rbx),%xmm4
   0x0000000000626806 <+166>:   movups %xmm4,0x38(%r14)
   0x000000000062680b <+171>:   movdqu 0x43(%rbx),%xmm5
   0x0000000000626810 <+176>:   movups %xmm5,0x48(%r14)
   0x0000000000626815 <+181>:   movdqu 0x53(%rbx),%xmm6
   0x000000000062681a <+186>:   movups %xmm6,0x58(%r14)
   0x000000000062681f <+191>:   mov    0x63(%rbx),%rdx
   0x0000000000626823 <+195>:   mov    %rdx,0x68(%r14)
   0x0000000000626827 <+199>:   mov    0x70(%r13),%rax
   0x000000000062682b <+203>:   lea    -0x3(%rax),%edx
   0x000000000062682e <+206>:   and    $0x7,%edx
   0x0000000000626831 <+209>:   je     0x626850 <copy_font_spec+240>
   0x0000000000626833 <+211>:   jmp    0x626934 <copy_font_spec+468>
   0x0000000000626838 <+216>:   nopl   0x0(%rax,%rax,1)
   0x0000000000626840 <+224>:   mov    0x10(%rbx),%rax
   0x0000000000626844 <+228>:   lea    -0x3(%rax),%edx
   0x0000000000626847 <+231>:   and    $0x7,%edx
   0x000000000062684a <+234>:   jne    0x626934 <copy_font_spec+468>
   0x0000000000626850 <+240>:   mov    0x5(%rax),%rsi
   0x0000000000626854 <+244>:   lea    -0x3(%rax),%rbx
   0x0000000000626858 <+248>:   cmpb   $0x0,0x70ecc2(%rip)        # 0xd35521 <globals+4513>
   0x000000000062685f <+255>:   mov    0x5(%rsi),%rax
   0x0000000000626863 <+259>:   lea    -0x3(%rsi),%rdx
   0x0000000000626867 <+263>:   mov    %rax,%rcx
   0x000000000062686a <+266>:   je     0x626890 <copy_font_spec+304>
   0x000000000062686c <+268>:   lea    -0x5(%rax),%edi
   0x000000000062686f <+271>:   and    $0x7,%edi
   0x0000000000626872 <+274>:   jne    0x626890 <copy_font_spec+304>
   0x0000000000626874 <+276>:   movabs $0x4000000006000000,%r9
   0x000000000062687e <+286>:   mov    0x3(%rax),%rdi
   0x0000000000626882 <+290>:   and    %r12,%rdi
   0x0000000000626885 <+293>:   cmp    %r9,%rdi
   0x0000000000626888 <+296>:   jne    0x626890 <copy_font_spec+304>
   0x000000000062688a <+298>:   mov    0xb(%rax),%rcx
   0x000000000062688e <+302>:   xchg   %ax,%ax
   0x0000000000626890 <+304>:   cmp    $0x14c8,%rcx
   0x0000000000626897 <+311>:   je     0x626840 <copy_font_spec+224>
   0x0000000000626899 <+313>:   lea    -0x3(%rsi),%ecx
   0x000000000062689c <+316>:   and    $0x7,%ecx
   0x000000000062689f <+319>:   jne    0x626950 <copy_font_spec+496>
   0x00000000006268a5 <+325>:   mov    0x10(%rdx),%rsi
   0x00000000006268a9 <+329>:   movq   %rax,%xmm0
   0x00000000006268ae <+334>:   movq   %rsi,%xmm1
   0x00000000006268b3 <+339>:   mov    $0x18,%edi
   0x00000000006268b8 <+344>:   mov    0x1e3979(%rip),%rax        # 0x80a238 <current_thread>
   0x00000000006268bf <+351>:   punpcklqdq %xmm1,%xmm0
   0x00000000006268c3 <+355>:   mov    $0x3,%esi
   0x00000000006268c8 <+360>:   mov    0x210(%rax),%rax
   0x00000000006268cf <+367>:   movaps %xmm0,-0x40(%rbp)
   0x00000000006268d3 <+371>:   mov    0x20(%rax),%rdx
   0x00000000006268d7 <+375>:   call   0x69a920 <alloc_impl>
   0x00000000006268dc <+380>:   movdqa -0x40(%rbp),%xmm0
   0x00000000006268e1 <+385>:   mov    $0x3,%esi
   0x00000000006268e6 <+390>:   mov    $0x18,%edi
   0x00000000006268eb <+395>:   mov    %rax,%r13
   0x00000000006268ee <+398>:   movups %xmm0,0x8(%rax)
   0x00000000006268f2 <+402>:   mov    0x1e393f(%rip),%rax        # 0x80a238 <current_thread>
   0x00000000006268f9 <+409>:   mov    0x210(%rax),%rax
   0x0000000000626900 <+416>:   mov    0x20(%rax),%rdx
   0x0000000000626904 <+420>:   call   0x69a920 <alloc_impl>
   0x0000000000626909 <+425>:   lea    0x3(%r13),%rcx
   0x000000000062690d <+429>:   lea    0x3(%rax),%rdx
   0x0000000000626911 <+433>:   mov    %rcx,0x8(%rax)
   0x0000000000626915 <+437>:   movq   $0x0,0x10(%rax)
   0x000000000062691d <+445>:   mov    %rdx,(%r15)
   0x0000000000626920 <+448>:   lea    0x10(%rax),%r15
   0x0000000000626924 <+452>:   mov    0x10(%rbx),%rax
   0x0000000000626928 <+456>:   lea    -0x3(%rax),%edx
   0x000000000062692b <+459>:   and    $0x7,%edx
   0x000000000062692e <+462>:   je     0x626850 <copy_font_spec+240>
   0x0000000000626934 <+468>:   add    $0x18,%rsp
   0x0000000000626938 <+472>:   lea    0x5(%r14),%rax
   0x000000000062693c <+476>:   pop    %rbx
   0x000000000062693d <+477>:   pop    %r12
   0x000000000062693f <+479>:   pop    %r13
   0x0000000000626941 <+481>:   pop    %r14
   0x0000000000626943 <+483>:   pop    %r15
   0x0000000000626945 <+485>:   pop    %rbp
   0x0000000000626946 <+486>:   ret
   0x0000000000626947 <+487>:   nopw   0x0(%rax,%rax,1)
   0x0000000000626950 <+496>:   test   %rsi,%rsi
   0x0000000000626953 <+499>:   je     0x6268a9 <copy_font_spec+329>
   0x0000000000626959 <+505>:   jmp    0x42d48f <copy_font_spec-2069201>
Address range 0x42d482 to 0x42d499:
   0x000000000042d482 <-2069214>:       mov    %rbx,%rsi
   0x000000000042d485 <-2069211>:       mov    $0xa4b8,%edi
   0x000000000042d48a <-2069206>:       call   0x42b228 <wrong_type_argument>
   0x000000000042d48f <-2069201>:       mov    $0xe658,%edi
   0x000000000042d494 <-2069196>:       call   0x42b228 <wrong_type_argument>
End of assembler dump.
(gdb) disass Flist
Dump of assembler code for function Flist:
   0x00000000005d2f60 <+0>:     test   %rdi,%rdi
   0x00000000005d2f63 <+3>:     jle    0x5d2fd8 <Flist+120>
   0x00000000005d2f65 <+5>:     push   %rbp
   0x00000000005d2f66 <+6>:     xor    %eax,%eax
   0x00000000005d2f68 <+8>:     mov    %rsp,%rbp
   0x00000000005d2f6b <+11>:    push   %r12
   0x00000000005d2f6d <+13>:    mov    %rsi,%r12
   0x00000000005d2f70 <+16>:    push   %rbx
   0x00000000005d2f71 <+17>:    mov    %rdi,%rbx
   0x00000000005d2f74 <+20>:    sub    $0x10,%rsp
   0x00000000005d2f78 <+24>:    nopl   0x0(%rax,%rax,1)
   0x00000000005d2f80 <+32>:    movq   %rax,%xmm1
   0x00000000005d2f85 <+37>:    mov    0x2372ac(%rip),%rax        # 0x80a238 <current_thread>
   0x00000000005d2f8c <+44>:    sub    $0x1,%rbx
   0x00000000005d2f90 <+48>:    mov    $0x3,%esi
   0x00000000005d2f95 <+53>:    movq   (%r12,%rbx,8),%xmm0
   0x00000000005d2f9b <+59>:    mov    $0x18,%edi
   0x00000000005d2fa0 <+64>:    mov    0x210(%rax),%rax
   0x00000000005d2fa7 <+71>:    punpcklqdq %xmm1,%xmm0
   0x00000000005d2fab <+75>:    mov    0x20(%rax),%rdx
   0x00000000005d2faf <+79>:    movaps %xmm0,-0x20(%rbp)
   0x00000000005d2fb3 <+83>:    call   0x69a920 <alloc_impl>
   0x00000000005d2fb8 <+88>:    movdqa -0x20(%rbp),%xmm0
   0x00000000005d2fbd <+93>:    add    $0x3,%rax
   0x00000000005d2fc1 <+97>:    movups %xmm0,0x5(%rax)
   0x00000000005d2fc5 <+101>:   test   %rbx,%rbx
   0x00000000005d2fc8 <+104>:   jne    0x5d2f80 <Flist+32>
   0x00000000005d2fca <+106>:   add    $0x10,%rsp
   0x00000000005d2fce <+110>:   pop    %rbx
   0x00000000005d2fcf <+111>:   pop    %r12
   0x00000000005d2fd1 <+113>:   pop    %rbp
   0x00000000005d2fd2 <+114>:   ret
   0x00000000005d2fd3 <+115>:   nopl   0x0(%rax,%rax,1)
   0x00000000005d2fd8 <+120>:   xor    %eax,%eax
   0x00000000005d2fda <+122>:   ret
End of assembler dump.
(gdb)



>> Thank you, now I'm going to recompile emacs by:
>> make extraclean
>> ./autogen.sh \
>>   && ./configure CFLAGS='-g3 -ggdb -O2 -fno-omit-frame-pointer -mtune=native -march=native' \
>>   --prefix=$(realpath ../emacs-build/$(git branch --show-current | sed 's/\//_/g'))\
>>   --with-mps=yes \
>>   --with-imagemagick  \
>>   --with-modules \
>>   --without-compress-install \
>>   --with-native-compilation  --with-mailutils\
>>   --enable-link-time-optimization \
>>   --with-tree-sitter --with-xinput2  \
>>   --with-dbus  --with-native-compilation=aot \
>>   --with-file-notification=inotify\
>>   && make -j30 install
>>
>> Do you think it's right?
>
> That looks good to me!
>
> Thanks
> Pip

Thanks
Eval Exec

-- 



  reply	other threads:[~2024-09-05 11:26 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05  6:24 [scratch/igc] 985247b6bee crash on Linux, KDE, Wayland Eval EXEC
2024-09-05  7:14 ` Eval EXEC
2024-09-05  8:17   ` Eval EXEC
2024-09-05  7:21 ` Eval EXEC
2024-09-05  8:08 ` Eli Zaretskii
2024-09-05  8:14   ` Eval EXEC
2024-09-05 11:12   ` Pip Cet
2024-09-05  8:24 ` Helmut Eller
2024-09-05  8:28   ` Eval EXEC
2024-09-05  8:34     ` Helmut Eller
2024-09-05  8:37       ` Eval EXEC
2024-09-05 10:44       ` Eval EXEC
2024-09-05 11:01         ` Eli Zaretskii
2024-09-05 11:04           ` Eval EXEC
2024-09-05 11:09 ` Pip Cet
2024-09-05 11:15   ` Eval EXEC
2024-09-05 11:19     ` Pip Cet
2024-09-05 11:26       ` Eval EXEC [this message]
2024-09-05 16:04         ` Pip Cet
2024-09-05 16:32           ` Eval EXEC
2024-09-05 11:34       ` Eval EXEC
2024-09-05 11:49       ` Eval EXEC
2024-09-05 12:21         ` Eli Zaretskii
2024-09-05 13:20           ` Gerd Möllmann
2024-09-05 13:31             ` Eli Zaretskii
2024-09-05 13:37               ` Gerd Möllmann
2024-09-05 13:52                 ` Eli Zaretskii
2024-09-05 13:57                   ` Gerd Möllmann
2024-09-05 14:33                     ` Eli Zaretskii
2024-09-05 14:44                       ` Eli Zaretskii
2024-09-05 14:58                       ` Gerd Möllmann
2024-09-05 16:19                       ` Pip Cet
2024-09-05 16:40                         ` Eval EXEC
2024-09-05 16:45                         ` Eval EXEC
2024-09-05 16:57                         ` Eval EXEC
2024-09-05 16:59                           ` Eval EXEC
2024-09-05 17:03                           ` Pip Cet
2024-09-05 17:05                             ` Eval EXEC
2024-09-05 17:16                               ` Gerd Möllmann
2024-09-05 18:46                                 ` Eli Zaretskii
2024-09-05 19:24                                   ` Gerd Möllmann
2024-09-05 19:31                                     ` Eli Zaretskii
2024-09-05 18:48                               ` Eli Zaretskii
2024-09-05 18:56                                 ` Eval EXEC
2024-09-05 19:23                                   ` Eli Zaretskii
2024-09-05 19:31                                     ` Eli Zaretskii
2024-09-06  2:15                                     ` Eval EXEC
2024-09-06  3:10                                       ` Eval EXEC
2024-09-06  5:58                                         ` Pip Cet
2024-09-06  6:32                                           ` Eval EXEC
2024-09-06  7:41                                             ` Pip Cet
2024-09-06  8:28                                               ` Eval EXEC
2024-09-06 12:58                                                 ` Pip Cet
2024-09-06 13:14                                                   ` Eval EXEC
2024-09-06 10:57                                               ` Eli Zaretskii
2024-09-06 13:03                                                 ` Eval EXEC
2024-09-06 19:29                                             ` Pip Cet
2024-09-07  5:57                                               ` Eli Zaretskii
2024-09-07  9:05                                                 ` Pip Cet
2024-09-06  6:39                                           ` Eval EXEC
2024-09-06  7:43                                             ` Pip Cet
2024-09-07  7:46                                               ` Eval EXEC
2024-09-07  8:10                                                 ` Pip Cet
2024-09-07 13:20                                                   ` Gerd Möllmann
2024-09-06  6:05                                         ` Eli Zaretskii
2024-09-06  6:30                                           ` Pip Cet
2024-09-06  6:34                                           ` Eval EXEC
2024-09-06 11:49                                             ` Eli Zaretskii
2024-09-06 13:08                                               ` Eval EXEC
2024-09-05 19:01                                 ` Eval EXEC
2024-09-05 17:29                             ` Eval EXEC

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=87tteu2vfq.fsf@gmail.com \
    --to=execvy@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=pipcet@protonmail.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).