* Problems with HOME on w32
@ 2006-05-18 17:47 Lennart Borgman
2006-05-18 19:31 ` Eli Zaretskii
2006-05-19 8:02 ` Jason Rumney
0 siblings, 2 replies; 9+ messages in thread
From: Lennart Borgman @ 2006-05-18 17:47 UTC (permalink / raw)
There is a message about a problem with HOME on w32 on
http://www.emacswiki.org/cgi-bin/wiki/EmacsW32 :
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
The symptom is “Error (initialization): User has no home directory” and
no .emacs file loaded.
A quick kook at HOME env. var shows:
(getenv "HOME") -> "Š,ûw"
I traced Emacs22 file access with NTFILMON
(http://www.sysinternals.com). I found that Emacs try to query
information on |C:\.emacs| (after one on |C:\|) and fails with buffer
overflow (I guess the structure passed to store query result is too
small). Seems something goes bad inside Emacs so that HOME is corrupted.
It should be noted that without a |C:\.emacs| file, everything works and
then .emacs file is expected in %APPDATA% directory for 22.0.50.1 and
HOME env. var point to this place too.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I tested and got the same result with GNU Emacs 22.0.50.1
(i386-mingw-nt5.0.2195) of 2006-05-13.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problems with HOME on w32
2006-05-18 17:47 Problems with HOME on w32 Lennart Borgman
@ 2006-05-18 19:31 ` Eli Zaretskii
[not found] ` <446CDB19.9030807@student.lu.se>
2006-05-19 8:02 ` Jason Rumney
1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2006-05-18 19:31 UTC (permalink / raw)
Cc: emacs-devel
> Date: Thu, 18 May 2006 19:47:01 +0200
> From: Lennart Borgman <lennart.borgman.073@student.lu.se>
>
> I traced Emacs22 file access with NTFILMON
> (http://www.sysinternals.com). I found that Emacs try to query
> information on |C:\.emacs| (after one on |C:\|) and fails with buffer
> overflow (I guess the structure passed to store query result is too
> small). Seems something goes bad inside Emacs so that HOME is corrupted.
>
> It should be noted that without a |C:\.emacs| file, everything works and
> then .emacs file is expected in %APPDATA% directory for 22.0.50.1 and
> HOME env. var point to this place too.
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> I tested and got the same result with GNU Emacs 22.0.50.1
> (i386-mingw-nt5.0.2195) of 2006-05-13.
Lennart, could you please explain in plain English what is the
problem? I'm sorry, but I cannot make heads or tails out of the
original report you cited, nor can I understand the precise recipe to
reproduce the bug. Is the reason the non-ASCII characters used in the
value of HOME? or is that the symptom of corruption? what does probing
C:\.emacs have to do with this? etc., etc.
Since you say that you can reproduce the problem with a fairly recent
build, please give a precise recipe for that, including what should be
the value of HOME, which .emacs files should be present in what
directories, etc.
And please don't use NTFILMON or similar tracing tools; instead, if
you need to see what is going on under the hood, please step with a
debugger into the relevant code (it's in the function init_environment
defined on w32.c), and tell what you see.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problems with HOME on w32
2006-05-18 17:47 Problems with HOME on w32 Lennart Borgman
2006-05-18 19:31 ` Eli Zaretskii
@ 2006-05-19 8:02 ` Jason Rumney
2006-05-19 16:37 ` Eli Zaretskii
1 sibling, 1 reply; 9+ messages in thread
From: Jason Rumney @ 2006-05-19 8:02 UTC (permalink / raw)
Cc: Emacs Devel
Seems like a bug in the library if the following causes a buffer
overflow when .emacs exists:
struct stat ignored;
stat ("C:/.emacs", &ignored);
Lennart Borgman wrote:
> There is a message about a problem with HOME on w32 on
> http://www.emacswiki.org/cgi-bin/wiki/EmacsW32 :
>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> The symptom is “Error (initialization): User has no home directory”
> and no .emacs file loaded.
>
> A quick kook at HOME env. var shows:
>
> (getenv "HOME") -> "Š,ûw"
>
> I traced Emacs22 file access with NTFILMON
It would be more useful to use gdb.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problems with HOME on w32
2006-05-19 8:02 ` Jason Rumney
@ 2006-05-19 16:37 ` Eli Zaretskii
0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2006-05-19 16:37 UTC (permalink / raw)
Cc: lennart.borgman.073, emacs-devel
> Date: Fri, 19 May 2006 09:02:13 +0100
> From: Jason Rumney <jasonr@gnu.org>
> Cc: Emacs Devel <emacs-devel@gnu.org>
>
> Seems like a bug in the library if the following causes a buffer
> overflow when .emacs exists:
>
> struct stat ignored;
> stat ("C:/.emacs", &ignored);
Sorry, Jason I'm not following: what made you think there's a buffer
overflow in the call to `stat'? Did you step through the code with a
debugger? If so, what you saw?
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-05-20 8:52 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-18 17:47 Problems with HOME on w32 Lennart Borgman
2006-05-18 19:31 ` Eli Zaretskii
[not found] ` <446CDB19.9030807@student.lu.se>
2006-05-19 9:50 ` Eli Zaretskii
2006-05-19 14:14 ` Lennart Borgman
2006-05-19 19:09 ` Eli Zaretskii
2006-05-20 6:52 ` Lennart Borgman
2006-05-20 8:52 ` Eli Zaretskii
2006-05-19 8:02 ` Jason Rumney
2006-05-19 16:37 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.