GNU bug report logs -
#41242
Port feature/native-comp to Windows
Previous Next
Full log
Message #185 received at 41242 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> Can you explain what problem this solves, and how? It is especially
> important to understand when will be emacs_root_dir first called
> during a session. That's because it calls filename_from_ansi, which
> AFAIR needs some setup that happens at the beginning of a session.
When loading a dump file that contains native compiled elisp we try to find
the
.eln file. This uses Ffile_exists_p(). This function, in turn, calls
Fexpand_file_name(). This function will use the root directory as
`default_directory' as a fallback.
Getting the root directory requires reading the $emacs_dir environment
variable.
This is setup later in the initialization process. This caused a crash.
Fexpand_file_name() was trying to obtain the root directory even when it
was not
necessary because `default-directory' was not nil. My patch makes sure that
this
only happens when necessary.
It turns out that the dump loading process does not set `default-directory'
to
nil, therefore Fexpand_file_name() does not need to find out the root
directory
and we avoid reading an environment variable that is not set yet.
With this patch we avoid calling filename_from_ansi() too early (It is not
the
reason why Emacs crashed, but it is still a good idea to call it after it
has
been setup properly.
Nico
[Message part 2 (text/html, inline)]
This bug report was last modified 5 years and 42 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.