From: Eli Zaretskii <eliz@gnu.org>
To: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Unexec dumping results in "Segmentation fault" on Windows Msys2
Date: Thu, 15 Apr 2021 19:08:09 +0300 [thread overview]
Message-ID: <83eefby1hy.fsf@gnu.org> (raw)
In-Reply-To: <e08cc529-5be9-a424-a4d9-b0152e50681d@gmail.com> (message from Nikolay Kudryavtsev on Thu, 15 Apr 2021 18:47:31 +0300)
> From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 15 Apr 2021 18:47:31 +0300
>
> Binutils triggered segfault:
>
> $ temacs.exe -Q
> Warning: Lisp directory
> 'd:/Emacs/configurations/msys2-brake-test/src/lisp': No such file or
> directory
> Cannot open load file: No such file or directory, loadup.el
Does the directory d:/Emacs/configurations/msys2-brake-test/src/lisp
exist? If so, please try running temacs.exe from cmd.exe, not from
MSYS2 Bash. If that fails with the same error message, then please
step into the call to file_accessible_directory_p in this function
(from lread.c):
static void
load_path_check (Lisp_Object lpath)
{
Lisp_Object path_tail;
/* The only elements that might not exist are those from
PATH_LOADSEARCH, EMACSLOADPATH. Anything else is only added if
it exists. */
for (path_tail = lpath; !NILP (path_tail); path_tail = XCDR (path_tail))
{
Lisp_Object dirfile;
dirfile = Fcar (path_tail);
if (STRINGP (dirfile))
{
dirfile = Fdirectory_file_name (dirfile);
if (! file_accessible_directory_p (dirfile)) <<<<<<<<<<<<<<<<<
dir_warning ("Lisp directory", XCAR (path_tail));
}
}
}
and see why it fails, including the code in w32_accessible_directory_p
that it calls.
> (gdb) p &stack_bottom_variable
> $1 = (void **) 0xbd3cbff6c8
Nothing wrong with that. And what do these produce:
(gdb) p current_thread
(gdb) p current_thread->m_stack_bottom
> I went for bisecting hoping to find that simple localized change. It was
> not my intention to tease you, at least not since the second letter. ;-)
> I can grab as many full backtraces or do other tests as needed. It's
> just that the GDB session looked completely fine to me in my admittedly
> limited understanding of low level Emacs internals. The crash happens
> when bootstrap-emacs is doing dumping(same place as the other problem).
> Here's a couple backtraces:
>
> https://gist.githubusercontent.com/sg2002/32ea64634a89e7b407f50e29b4ab5f7e/raw/aa0bcc517e1a4de733a9dc2678f8c45daefb95f9/gistfile1.txt
>
> https://gist.githubusercontent.com/sg2002/d9cfaf1268973b20d66d79f5df575498/raw/06091019c1d30b863e6000fb642e09316d82a344/gistfile1.txt
These look like some kind of infinite recursion that causes stack
overflow. So the final segfault is not interesting; what's
interesting is why there's infinite recursion.
next prev parent reply other threads:[~2021-04-15 16:08 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-03 20:20 Unexec dumping results in "Segmentation fault" on Windows Msys2 Nikolay Kudryavtsev
2021-04-04 7:11 ` Eli Zaretskii
2021-04-04 7:55 ` Eli Zaretskii
2021-04-04 8:41 ` Nikolay Kudryavtsev
2021-04-04 11:34 ` Eli Zaretskii
2021-04-14 22:11 ` Nikolay Kudryavtsev
2021-04-15 6:49 ` Eli Zaretskii
2021-04-15 13:07 ` Camm Maguire
2021-04-15 13:49 ` Eli Zaretskii
2021-04-15 15:47 ` Nikolay Kudryavtsev
2021-04-15 16:08 ` Eli Zaretskii [this message]
2021-04-15 19:17 ` Nikolay Kudryavtsev
2021-04-15 19:59 ` Eli Zaretskii
2021-04-16 16:57 ` Nikolay Kudryavtsev
2021-04-16 19:41 ` Eli Zaretskii
2021-04-21 16:33 ` Nikolay Kudryavtsev
2021-04-21 17:41 ` Eli Zaretskii
2021-04-21 18:19 ` Nikolay Kudryavtsev
2021-04-22 14:25 ` Eli Zaretskii
2021-04-29 19:17 ` Nikolay Kudryavtsev
2021-04-30 11:24 ` Eli Zaretskii
2021-05-02 9:43 ` Nikolay Kudryavtsev
2021-05-02 10:17 ` Eli Zaretskii
2021-04-22 17:22 ` Eli Zaretskii
2021-04-22 18:59 ` Nikolay Kudryavtsev
2021-04-22 19:13 ` Eli Zaretskii
2021-04-22 19:26 ` Nikolay Kudryavtsev
2021-04-16 7:45 ` Eli Zaretskii
2021-04-15 16:12 ` Eli Zaretskii
2021-04-15 19:45 ` Nikolay Kudryavtsev
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=83eefby1hy.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=nikolay.kudryavtsev@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).