Subject: bug#22301: 25.1.50; Emacs crashes while lisp debugging

From: Vincent Belaïche <[email-masked]>
Date: Mon, 04 Jan 2016 09:00:42 +0100

Well, I had another crash --- still debugging some SES functions as I
need to fix my own bugs... Here it is:

--8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
Vincent@AIGLEROYAL /c/Programmes/installation/emacs-install/master/emacs/src
$ gdb -p 11676
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 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 "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 11676
[New Thread 11676.0x1edc]
[New Thread 11676.0x2f4]
[New Thread 11676.0x2c48]
[New Thread 11676.0x1ec8]
[New Thread 11676.0x267c]
[New Thread 11676.0x2aa0]
[New Thread 11676.0xafc]
Reading symbols from C:\Nos_Programmes\GNU\Emacs\bin\emacs.exe...done.
To enable execution of this file add
	add-auto-load-safe-path c:\Programmes\installation\emacs-install\master\emacs\src\.gdbinit
line to your configuration file "c:/Users/Vincent/AppData/Roaming/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "c:/Users/Vincent/AppData/Roaming/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
(gdb) warning: File "c:\Programmes\installation\emacs-install\master\emacs\src\.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load;C:\Programmes\installation\emacs-install\master\emacs\trunk\src\.gdbinit;C:\Programmes\installation\emacs-install\emacs-25\emacs\trunk\src\.gdbinit".
quit
A debugging session is active.

	Inferior 1 [process 11676] will be detached.

Quit anyway? (y or n) [answered Y; input not from terminal]
Detaching from program: C:\Nos_Programmes\GNU\Emacs\bin\emacs.exe, Pid 11676
]0;MINGW32:/c/Programmes/installation/emacs-install/master/emacs/src
Vincent@AIGLEROYAL /c/Programmes/installation/emacs-install/master/emacs/src
$ 
]0;MINGW32:/c/Programmes/installation/emacs-install/master/emacs/src
Vincent@AIGLEROYAL /c/Programmes/installation/emacs-install/master/emacs/src
$ gdb -p 11676
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 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 "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 11676
[New Thread 11676.0x1edc]
[New Thread 11676.0x2f4]
[New Thread 11676.0x2c48]
[New Thread 11676.0x1ec8]
[New Thread 11676.0x267c]
[New Thread 11676.0x2aa0]
[New Thread 11676.0x430]
Reading symbols from C:\Nos_Programmes\GNU\Emacs\bin\emacs.exe...done.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from terminal]
DISPLAY = w32
TERM = emacs
Breakpoint 1 at 0x10951bb: file emacs.c, line 370.
Temporary breakpoint 2 at 0x10aabd6: file sysdep.c, line 901.
(gdb) bt full
#0  0x771b8c51 in ntdll!DbgBreakPoint () from C:\WINDOWS\SYSTEM32\ntdll.dll
No symbol table info available.
#1  0x771e9e09 in ntdll!DbgUiRemoteBreakin ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
No symbol table info available.
#2  0xfb32daaf in ?? ()
No symbol table info available.
#3  0x771e9dd0 in ntdll!DbgUiIssueRemoteBreakin ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
No symbol table info available.
#4  0x760238f4 in KERNEL32!BaseThreadInitThunk ()
   from C:\WINDOWS\SYSTEM32\kernel32.dll
No symbol table info available.
#5  0x771a56c3 in ntdll!RtlUnicodeStringToInteger ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
No symbol table info available.
#6  0x00000000 in ?? ()
No symbol table info available.

Lisp Backtrace:
"backtrace" (0xbfedac)
"debugger-setup-buffer" (0xbfefe0)
"debug" (0xbff1b4)
"ses-relocate-all" (0xbff200)
"let" (0xbff3bc)
"ses-delete-row" (0xbff598)
"funcall-interactively" (0xbff594)
"call-interactively" (0xbff710)
"command-execute" (0xbff8dc)
(gdb) xbacktrace
"backtrace" (0xbfedac)
"debugger-setup-buffer" (0xbfefe0)
"debug" (0xbff1b4)
"ses-relocate-all" (0xbff200)
"let" (0xbff3bc)
"ses-delete-row" (0xbff598)
"funcall-interactively" (0xbff594)
"call-interactively" (0xbff710)
"command-execute" (0xbff8dc)
(gdb)
--8<----8<----8<----8<----8<--  end  -->8---->8---->8---->8---->8----

The debugging session is still opened, so please feel free to give
instructions if you want further details.

VBR,
	Vincent

PS: The emacs.exe that causes the crash is not exactly what I have in
the src because I had done some git pull meanwhile after my latest
installation.

Le 04/01/2016 04:41, Eli Zaretskii a écrit :
>> From: Vincent Belaïche <[email-masked]> 
>> Date: Sun, 03 Jan 2016 23:43:14 +0100
>> Cc: Vincent Belaïche <[email-masked]>
>>

[...]

>
> You attached the debugger too late, or maybe this is the wrong
> thread.  The backtrace is not informative.
>
> Also:
>
>> (gdb) warning: File "c:\Programmes\installation\emacs-install\master\emacs\src\.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load;C:\Programmes\installation\emacs-install\emacs\trunk\src\.gdbinit".
>
> This needs to be fixed.
>
>> The crash happened while I was debugging a modified version of SES. I
>> am not sure I can reproduce it.
>
> If you are unable to reproduce, there's nothing that can be done with
> this report, sorry.