* emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
@ 2008-02-11 12:11 Eric Lilja
2008-02-11 12:26 ` Jason Rumney
2008-02-14 21:10 ` Eric Hanchrow
0 siblings, 2 replies; 36+ messages in thread
From: Eric Lilja @ 2008-02-11 12:11 UTC (permalink / raw)
To: emacs-devel
Hello, I just built a fresh trunk checkout on my WinXP machine. The
binaries seem to work fine (though the annoying coding system warning is
still present). I used --enable-font-backend during the configure step.
However, those binaries crashes immediately under Windows Vista.
You can do emacs --version and emacs -help, the expected output is
displayed. However, emacs -Q crashes immediately (and without -Q).
Under cygwin (on my vista machine), I tried:
$ strace emacs -Q
just to see what strace would say:
--- Process 3660, exception C00000005 at 77DF986B
was the only output.
- Eric Lilja
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-11 12:11 emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista Eric Lilja
@ 2008-02-11 12:26 ` Jason Rumney
2008-02-11 12:30 ` Eric Lilja
2008-02-14 21:10 ` Eric Hanchrow
1 sibling, 1 reply; 36+ messages in thread
From: Jason Rumney @ 2008-02-11 12:26 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
Eric Lilja wrote:
> Hello, I just built a fresh trunk checkout on my WinXP machine. The
> binaries seem to work fine (though the annoying coding system warning
> is still present). I used --enable-font-backend during the configure
> step. However, those binaries crashes immediately under Windows Vista.
> You can do emacs --version and emacs -help, the expected output is
> displayed. However, emacs -Q crashes immediately (and without -Q).
Please run emacs under gdb to find where it crashes.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-11 12:26 ` Jason Rumney
@ 2008-02-11 12:30 ` Eric Lilja
2008-02-11 12:40 ` Jason Rumney
0 siblings, 1 reply; 36+ messages in thread
From: Eric Lilja @ 2008-02-11 12:30 UTC (permalink / raw)
To: emacs-devel
Jason Rumney wrote:
> Please run emacs under gdb to find where it crashes.
>
>
>
>
Does this help?
$ gdb emacs
GNU gdb 6.5.50.20060706-cvs (cygwin-special)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...(no debugging symbols found)
(gdb) run
Starting program: /cygdrive/c/emacs-23/bin/emacs.exe
Loaded symbols for /cygdrive/c/Windows/system32/ntdll.dll
Loaded symbols for /cygdrive/c/Windows/system32/kernel32.dll
Loaded symbols for /cygdrive/c/Windows/system32/msvcrt.dll
Loaded symbols for /cygdrive/c/Windows/system32/advapi32.dll
Loaded symbols for /cygdrive/c/Windows/system32/rpcrt4.dll
Loaded symbols for
/cygdrive/c/Windows/WinSxS/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6000.16386_none_5d07289e07e1d100/comctl32.d
ll
Loaded symbols for /cygdrive/c/Windows/system32/gdi32.dll
Loaded symbols for /cygdrive/c/Windows/system32/user32.dll
Loaded symbols for /cygdrive/c/Windows/system32/shlwapi.dll
Loaded symbols for /cygdrive/c/Windows/system32/comdlg32.dll
Loaded symbols for /cygdrive/c/Windows/system32/shell32.dll
Loaded symbols for /cygdrive/c/Windows/system32/mpr.dll
Loaded symbols for /cygdrive/c/Windows/system32/ole32.dll
Loaded symbols for /cygdrive/c/Windows/system32/winmm.dll
Loaded symbols for /cygdrive/c/Windows/system32/oleaut32.dll
Loaded symbols for /cygdrive/c/Windows/system32/oleacc.dll
Loaded symbols for /cygdrive/c/Windows/system32/winspool.drv
Program received signal SIGSEGV, Segmentation fault.
0x77df986b in ?? ()
(gdb) bt
#0 0x77df986b in ?? ()
#1 0x01080f6b in init_user_info ()
#2 0x01083754 in init_environment ()
#3 0x0100260e in main ()
(gdb)
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-11 12:30 ` Eric Lilja
@ 2008-02-11 12:40 ` Jason Rumney
2008-02-11 12:48 ` Eric Lilja
0 siblings, 1 reply; 36+ messages in thread
From: Jason Rumney @ 2008-02-11 12:40 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
Eric Lilja wrote:
> Program received signal SIGSEGV, Segmentation fault.
> 0x77df986b in ?? ()
> (gdb) bt
> #0 0x77df986b in ?? ()
> #1 0x01080f6b in init_user_info ()
> #2 0x01083754 in init_environment ()
> #3 0x0100260e in main ()
> (gdb)
It helps a bit. I don't know whether its the absence of source/object
files on the machine where this is being debugged, the flags used to
build Emacs, or an incompatibility between mingw and cygwin but the
backtrace is missing file and line number information. The file I can
work out (w32.c), but if the line number was there it would be more
apparent what was going wrong.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-11 12:40 ` Jason Rumney
@ 2008-02-11 12:48 ` Eric Lilja
2008-02-11 12:51 ` Jason Rumney
0 siblings, 1 reply; 36+ messages in thread
From: Eric Lilja @ 2008-02-11 12:48 UTC (permalink / raw)
To: emacs-devel
Jason Rumney skrev:
> Eric Lilja wrote:
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x77df986b in ?? ()
>> (gdb) bt
>> #0 0x77df986b in ?? ()
>> #1 0x01080f6b in init_user_info ()
>> #2 0x01083754 in init_environment ()
>> #3 0x0100260e in main ()
>> (gdb)
>
> It helps a bit. I don't know whether its the absence of source/object
> files on the machine where this is being debugged, the flags used to
> build Emacs, or an incompatibility between mingw and cygwin but the
> backtrace is missing file and line number information. The file I can
> work out (w32.c), but if the line number was there it would be more
> apparent what was going wrong.
>
>
>
>
>
>
I just remembered that my build script passes --no-debug during the
configure step. Would it be worthwhile to rebuild without it?
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-11 12:48 ` Eric Lilja
@ 2008-02-11 12:51 ` Jason Rumney
2008-02-11 13:10 ` Eric Lilja
0 siblings, 1 reply; 36+ messages in thread
From: Jason Rumney @ 2008-02-11 12:51 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
Eric Lilja wrote:
> I just remembered that my build script passes --no-debug during the
> configure step. Would it be worthwhile to rebuild without it?
Yes. Using --no-debug for a development copy is generally a bad idea.
Even for release builds, the savings in size and speed are insignificant
on modern hardware.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-11 12:51 ` Jason Rumney
@ 2008-02-11 13:10 ` Eric Lilja
2008-02-11 21:52 ` Eli Zaretskii
0 siblings, 1 reply; 36+ messages in thread
From: Eric Lilja @ 2008-02-11 13:10 UTC (permalink / raw)
To: emacs-devel
Jason Rumney skrev:
> Eric Lilja wrote:
>> I just remembered that my build script passes --no-debug during the
>> configure step. Would it be worthwhile to rebuild without it?
>
> Yes. Using --no-debug for a development copy is generally a bad idea.
> Even for release builds, the savings in size and speed are insignificant
> on modern hardware.
>
>
>
>
>
Here we go. Also, this time I added -Q when performing "run" under gdb:
Program received signal SIGSEGV, Segmentation fault.
0x77df986b in ?? ()
(gdb) bt
#0 0x77df986b in ?? ()
#1 0x01080f6b in init_user_info () at w32.c:619
#2 0x01083754 in init_environment (argv=0x8828f0) at w32.c:1297
#3 0x0100260e in main (argc=2, argv=0x8828f0) at emacs.c:1506
(gdb)
At least we have line numbers now.
- Eric
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-11 13:10 ` Eric Lilja
@ 2008-02-11 21:52 ` Eli Zaretskii
2008-02-11 22:57 ` Eric Lilja
0 siblings, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2008-02-11 21:52 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
> From: Eric Lilja <mindcooler@gmail.com>
> Date: Mon, 11 Feb 2008 14:10:52 +0100
>
> Here we go. Also, this time I added -Q when performing "run" under gdb:
> Program received signal SIGSEGV, Segmentation fault.
> 0x77df986b in ?? ()
> (gdb) bt
> #0 0x77df986b in ?? ()
> #1 0x01080f6b in init_user_info () at w32.c:619
> #2 0x01083754 in init_environment (argv=0x8828f0) at w32.c:1297
> #3 0x0100260e in main (argc=2, argv=0x8828f0) at emacs.c:1506
> (gdb)
>
> At least we have line numbers now.
Yes. Can you please step into get_sid_sub_authority_count, and see
what happens there? Does it fail to load advapi32.dll, perhaps? Or
does it succeed, but the return value of get_sid_sub_authority_count
is NULL, and then dereferencing it in init_user_info crashes?
Thanks.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-11 21:52 ` Eli Zaretskii
@ 2008-02-11 22:57 ` Eric Lilja
2008-02-12 4:14 ` Eli Zaretskii
0 siblings, 1 reply; 36+ messages in thread
From: Eric Lilja @ 2008-02-11 22:57 UTC (permalink / raw)
To: emacs-devel
Eli Zaretskii wrote:
>> From: Eric Lilja <mindcooler@gmail.com>
>> Date: Mon, 11 Feb 2008 14:10:52 +0100
>>
>> Here we go. Also, this time I added -Q when performing "run" under gdb:
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x77df986b in ?? ()
>> (gdb) bt
>> #0 0x77df986b in ?? ()
>> #1 0x01080f6b in init_user_info () at w32.c:619
>> #2 0x01083754 in init_environment (argv=0x8828f0) at w32.c:1297
>> #3 0x0100260e in main (argc=2, argv=0x8828f0) at emacs.c:1506
>> (gdb)
>>
>> At least we have line numbers now.
>
> Yes. Can you please step into get_sid_sub_authority_count, and see
> what happens there? Does it fail to load advapi32.dll, perhaps? Or
> does it succeed, but the return value of get_sid_sub_authority_count
> is NULL, and then dereferencing it in init_user_info crashes?
>
> Thanks.
>
>
>
I'm doing a fresh build right now (I wonder if I should have disabled
the new font backend this time to see what happened, oh well). Could you
explain how exactly I would do that in gdb? If I copy the source along
with the binaries, will gdb be able to find it and I can put a
breakpoint in there? I usually copy what gets put in the directory when
I do a make install.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-11 22:57 ` Eric Lilja
@ 2008-02-12 4:14 ` Eli Zaretskii
2008-02-12 9:49 ` Eric Lilja
2008-02-12 17:45 ` Richard Stallman
0 siblings, 2 replies; 36+ messages in thread
From: Eli Zaretskii @ 2008-02-12 4:14 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
> From: Eric Lilja <mindcooler@gmail.com>
> Date: Mon, 11 Feb 2008 23:57:00 +0100
>
> I'm doing a fresh build right now (I wonder if I should have disabled
> the new font backend this time to see what happened, oh well).
The default is to build with font backend disabled, so if you didn't
_enable_ it, you are building without it.
> Could you explain how exactly I would do that in gdb?
From the src directory:
gdb ./oo-spd/i386/emacs.exe
(gdb) break init_user_info
(gdb) run -Q
Then, when it stops in init_user_info, type:
(gdb) until 619
(619 is the number of the line where it calls
get_sid_sub_authority_count.)
When it stops at line 619, type "step" repeatedly to step through
get_sid_sub_authority_count, and see what happens there.
If you compiled with optimizations, it could be that
get_sid_sub_authority_count is inlined, and you will have difficulties
stepping through it. If that happens, please recompile without
optimizations (edit gmake.defs to remove the -U2 compiler switch, then
run configure, make, make install to rebuild).
> If I copy the source along with the binaries, will gdb be able to
> find it and I can put a breakpoint in there?
If it doesn't find the sources, use the `dir' command to tell GDB
where to find the sources. This command accepts a name of a directory
and adds it to the list of directories where GDB looks for sources.
Btw, is that a 32-bit Vista or a 64-bit one?
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-12 4:14 ` Eli Zaretskii
@ 2008-02-12 9:49 ` Eric Lilja
2008-02-13 20:22 ` Eli Zaretskii
2008-02-12 17:45 ` Richard Stallman
1 sibling, 1 reply; 36+ messages in thread
From: Eric Lilja @ 2008-02-12 9:49 UTC (permalink / raw)
To: emacs-devel
Eli Zaretskii wrote:
>> From: Eric Lilja <mindcooler@gmail.com>
>> Date: Mon, 11 Feb 2008 23:57:00 +0100
>>
>> I'm doing a fresh build right now (I wonder if I should have disabled
>> the new font backend this time to see what happened, oh well).
>
> The default is to build with font backend disabled, so if you didn't
> _enable_ it, you are building without it.
Yes, sorry.
>
>> Could you explain how exactly I would do that in gdb?
>
> From the src directory:
>
> gdb ./oo-spd/i386/emacs.exe
> (gdb) break init_user_info
> (gdb) run -Q
>
> Then, when it stops in init_user_info, type:
>
> (gdb) until 619
>
> (619 is the number of the line where it calls
> get_sid_sub_authority_count.)
>
> When it stops at line 619, type "step" repeatedly to step through
> get_sid_sub_authority_count, and see what happens there.
>
> If you compiled with optimizations, it could be that
> get_sid_sub_authority_count is inlined, and you will have difficulties
> stepping through it. If that happens, please recompile without
> optimizations (edit gmake.defs to remove the -U2 compiler switch, then
> run configure, make, make install to rebuild).
>
>> If I copy the source along with the binaries, will gdb be able to
>> find it and I can put a breakpoint in there?
>
> If it doesn't find the sources, use the `dir' command to tell GDB
> where to find the sources. This command accepts a name of a directory
> and adds it to the list of directories where GDB looks for sources.
>
> Btw, is that a 32-bit Vista or a 64-bit one?
>
>
>
It's a 32-bit vista. Here's my new gdb session:
$ gdb ./oo-spd/i386/emacs.exe
GNU gdb 6.5.50.20060706-cvs (cygwin-special)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
Environment variable "DISPLAY" not defined.
TERM = cygwin
Breakpoint 1 at 0x114ad94: file w32fns.c, line 9317.
Breakpoint 2 at 0x10a01d4: file sysdep.c, line 1319.
(gdb) break init_user_info
Breakpoint 3 at 0x1080d4c: file w32.c, line 598.
(gdb) run -Q
Starting program: /home/mindcooler/emacs/src/oo-spd/i386/emacs.exe -Q
Loaded symbols for /cygdrive/c/Windows/system32/ntdll.dll
Loaded symbols for /cygdrive/c/Windows/system32/kernel32.dll
Loaded symbols for /cygdrive/c/Windows/system32/msvcrt.dll
Loaded symbols for /cygdrive/c/Windows/system32/advapi32.dll
Loaded symbols for /cygdrive/c/Windows/system32/rpcrt4.dll
Loaded symbols for
/cygdrive/c/Windows/WinSxS/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6000.16386_none_5d07289e07e1d100/comctl32.d
ll
Loaded symbols for /cygdrive/c/Windows/system32/gdi32.dll
Loaded symbols for /cygdrive/c/Windows/system32/user32.dll
Loaded symbols for /cygdrive/c/Windows/system32/shlwapi.dll
Loaded symbols for /cygdrive/c/Windows/system32/comdlg32.dll
Loaded symbols for /cygdrive/c/Windows/system32/shell32.dll
Loaded symbols for /cygdrive/c/Windows/system32/mpr.dll
Loaded symbols for /cygdrive/c/Windows/system32/ole32.dll
Loaded symbols for /cygdrive/c/Windows/system32/winmm.dll
Loaded symbols for /cygdrive/c/Windows/system32/oleaut32.dll
Loaded symbols for /cygdrive/c/Windows/system32/oleacc.dll
Loaded symbols for /cygdrive/c/Windows/system32/winspool.drv
Breakpoint 3, init_user_info () at w32.c:598
598 DWORD length = sizeof (name), dlength = sizeof
(domain), trash;
(gdb) until 619
init_user_info () at w32.c:619
619 DWORD n_subauthorities =
(gdb) step
get_sid_sub_authority_count (pSid=0x82f288) at w32.c:388
388 {
(gdb) step
392 if (is_windows_9x () == TRUE)
(gdb) step
is_windows_9x () at w32.c:179
179 if (g_b_init_is_windows_9x == 0)
(gdb) step
190 }
(gdb) step
get_sid_sub_authority_count (pSid=0x82f288) at w32.c:396
396 if (g_b_init_get_sid_sub_authority_count == 0)
(gdb) step
404 if (s_pfn_Get_Sid_Sub_Authority_Count == NULL)
(gdb) step
408 return (s_pfn_Get_Sid_Sub_Authority_Count (pSid));
(gdb) step
409 }
(gdb) step
get_sid_sub_authority_count (pSid=0x0) at w32.c:408
408 return (s_pfn_Get_Sid_Sub_Authority_Count (pSid));
(gdb) step
0x77df986b in ntdll!_fltused ()
(gdb) step
Single stepping until exit from function ntdll!_fltused,
which has no line number information.
Program received signal SIGSEGV, Segmentation fault.
0x77df9871 in ntdll!_fltused ()
(gdb)
Hope this helps!
- Eric
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-12 4:14 ` Eli Zaretskii
2008-02-12 9:49 ` Eric Lilja
@ 2008-02-12 17:45 ` Richard Stallman
1 sibling, 0 replies; 36+ messages in thread
From: Richard Stallman @ 2008-02-12 17:45 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: mindcooler, emacs-devel
Since we're talking about running Emacs under the nastiest PC
operating system ever seen, I think it is relevant to direct
people's attention to BadVista.org.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-12 9:49 ` Eric Lilja
@ 2008-02-13 20:22 ` Eli Zaretskii
2008-02-13 22:57 ` Eric Lilja
0 siblings, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2008-02-13 20:22 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
> From: Eric Lilja <mindcooler@gmail.com>
> Date: Tue, 12 Feb 2008 10:49:29 +0100
>
> init_user_info () at w32.c:619
> 619 DWORD n_subauthorities =
> (gdb) step
> get_sid_sub_authority_count (pSid=0x82f288) at w32.c:388
> 388 {
> (gdb) step
> 392 if (is_windows_9x () == TRUE)
> (gdb) step
> is_windows_9x () at w32.c:179
> 179 if (g_b_init_is_windows_9x == 0)
> (gdb) step
> 190 }
> (gdb) step
> get_sid_sub_authority_count (pSid=0x82f288) at w32.c:396
> 396 if (g_b_init_get_sid_sub_authority_count == 0)
> (gdb) step
> 404 if (s_pfn_Get_Sid_Sub_Authority_Count == NULL)
> (gdb) step
> 408 return (s_pfn_Get_Sid_Sub_Authority_Count (pSid));
> (gdb) step
> 409 }
> (gdb) step
> get_sid_sub_authority_count (pSid=0x0) at w32.c:408
> 408 return (s_pfn_Get_Sid_Sub_Authority_Count (pSid));
> (gdb) step
> 0x77df986b in ntdll!_fltused ()
> (gdb) step
> Single stepping until exit from function ntdll!_fltused,
> which has no line number information.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x77df9871 in ntdll!_fltused ()
> (gdb)
Thanks.
Would it be possible for you to build Emacs without the change below,
and then see if it works on Vista? TIA
2008-01-26 Eli Zaretskii <eliz@gnu.org>
* w32.c (g_b_init_get_sid_sub_authority)
(g_b_init_get_sid_sub_authority_count): New static variables.
(GetSidSubAuthority_Proc, GetSidSubAuthorityCount_Proc): New typedefs.
(get_sid_sub_authority, get_sid_sub_authority_count): New functions.
(init_user_info): Use them to retrieve uid and gid.
Use 500/513, the Windows defaults, as Administrator's uid/gid.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-13 20:22 ` Eli Zaretskii
@ 2008-02-13 22:57 ` Eric Lilja
2008-02-14 0:03 ` Juanma Barranquero
0 siblings, 1 reply; 36+ messages in thread
From: Eric Lilja @ 2008-02-13 22:57 UTC (permalink / raw)
To: emacs-devel
Eli Zaretskii skrev:
>> From: Eric Lilja <mindcooler@gmail.com>
>> Date: Tue, 12 Feb 2008 10:49:29 +0100
>>
>> init_user_info () at w32.c:619
>> 619 DWORD n_subauthorities =
>> (gdb) step
>> get_sid_sub_authority_count (pSid=0x82f288) at w32.c:388
>> 388 {
>> (gdb) step
>> 392 if (is_windows_9x () == TRUE)
>> (gdb) step
>> is_windows_9x () at w32.c:179
>> 179 if (g_b_init_is_windows_9x == 0)
>> (gdb) step
>> 190 }
>> (gdb) step
>> get_sid_sub_authority_count (pSid=0x82f288) at w32.c:396
>> 396 if (g_b_init_get_sid_sub_authority_count == 0)
>> (gdb) step
>> 404 if (s_pfn_Get_Sid_Sub_Authority_Count == NULL)
>> (gdb) step
>> 408 return (s_pfn_Get_Sid_Sub_Authority_Count (pSid));
>> (gdb) step
>> 409 }
>> (gdb) step
>> get_sid_sub_authority_count (pSid=0x0) at w32.c:408
>> 408 return (s_pfn_Get_Sid_Sub_Authority_Count (pSid));
>> (gdb) step
>> 0x77df986b in ntdll!_fltused ()
>> (gdb) step
>> Single stepping until exit from function ntdll!_fltused,
>> which has no line number information.
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x77df9871 in ntdll!_fltused ()
>> (gdb)
>
> Thanks.
>
> Would it be possible for you to build Emacs without the change below,
> and then see if it works on Vista? TIA
>
> 2008-01-26 Eli Zaretskii <eliz@gnu.org>
>
> * w32.c (g_b_init_get_sid_sub_authority)
> (g_b_init_get_sid_sub_authority_count): New static variables.
> (GetSidSubAuthority_Proc, GetSidSubAuthorityCount_Proc): New typedefs.
> (get_sid_sub_authority, get_sid_sub_authority_count): New functions.
> (init_user_info): Use them to retrieve uid and gid.
> Use 500/513, the Windows defaults, as Administrator's uid/gid.
>
>
>
>
Yes, if I just knew a clean way of undoing that change.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-13 22:57 ` Eric Lilja
@ 2008-02-14 0:03 ` Juanma Barranquero
2008-02-14 0:44 ` Eric Lilja
0 siblings, 1 reply; 36+ messages in thread
From: Juanma Barranquero @ 2008-02-14 0:03 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
On Feb 13, 2008 11:57 PM, Eric Lilja <mindcooler@gmail.com> wrote:
> Yes, if I just knew a clean way of undoing that change.
You can try updating to a previous version, for example, in src/ do
cvs update -r 1.122 -p w32.c > w32.c
(the -p and redirection is to avoid the change being sticky, i.e.,
w32.c to be pegged to revision 1.122).
Juanma
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-14 0:03 ` Juanma Barranquero
@ 2008-02-14 0:44 ` Eric Lilja
2008-02-14 0:54 ` Juanma Barranquero
2008-02-14 0:57 ` Kenichi Handa
0 siblings, 2 replies; 36+ messages in thread
From: Eric Lilja @ 2008-02-14 0:44 UTC (permalink / raw)
To: emacs-devel
Juanma Barranquero wrote:
> On Feb 13, 2008 11:57 PM, Eric Lilja <mindcooler@gmail.com> wrote:
>
>> Yes, if I just knew a clean way of undoing that change.
>
> You can try updating to a previous version, for example, in src/ do
>
> cvs update -r 1.122 -p w32.c > w32.c
>
> (the -p and redirection is to avoid the change being sticky, i.e.,
> w32.c to be pegged to revision 1.122).
>
> Juanma
>
>
>
Thanks, I'll try that as soon as the error introduced to coding.c is
fixed so I can bootstrap again. :)
- Eric
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-14 0:44 ` Eric Lilja
@ 2008-02-14 0:54 ` Juanma Barranquero
2008-02-14 1:06 ` Eric Lilja
2008-02-14 0:57 ` Kenichi Handa
1 sibling, 1 reply; 36+ messages in thread
From: Juanma Barranquero @ 2008-02-14 0:54 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
On Feb 14, 2008 1:44 AM, Eric Lilja <mindcooler@gmail.com> wrote:
> Thanks, I'll try that as soon as the error introduced to coding.c is
> fixed so I can bootstrap again. :)
Just change the ASLOTs to AREF in the CODING_ATTR_* defines of coding.h
Juanma
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-14 0:44 ` Eric Lilja
2008-02-14 0:54 ` Juanma Barranquero
@ 2008-02-14 0:57 ` Kenichi Handa
1 sibling, 0 replies; 36+ messages in thread
From: Kenichi Handa @ 2008-02-14 0:57 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
In article <fp02t8$5cl$1@ger.gmane.org>, Eric Lilja <mindcooler@gmail.com> writes:
> Thanks, I'll try that as soon as the error introduced to coding.c is
> fixed so I can bootstrap again. :)
Please explain what error is introduced to coding.c. I'm
sorry but I have not followed the discussion of this
subject.
---
Kenichi Handa
handa@ni.aist.go.jp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-14 0:54 ` Juanma Barranquero
@ 2008-02-14 1:06 ` Eric Lilja
2008-02-14 1:18 ` Eric Lilja
0 siblings, 1 reply; 36+ messages in thread
From: Eric Lilja @ 2008-02-14 1:06 UTC (permalink / raw)
To: emacs-devel
Juanma Barranquero wrote:
> On Feb 14, 2008 1:44 AM, Eric Lilja <mindcooler@gmail.com> wrote:
>
>> Thanks, I'll try that as soon as the error introduced to coding.c is
>> fixed so I can bootstrap again. :)
>
> Just change the ASLOTs to AREF in the CODING_ATTR_* defines of coding.h
>
> Juanma
>
>
>
Thanks, bootstrapping now and enjoying a cup of tea while I wait.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-14 1:06 ` Eric Lilja
@ 2008-02-14 1:18 ` Eric Lilja
2008-02-14 8:32 ` Jason Rumney
2008-02-14 19:47 ` Eli Zaretskii
0 siblings, 2 replies; 36+ messages in thread
From: Eric Lilja @ 2008-02-14 1:18 UTC (permalink / raw)
To: emacs-devel
Eric Lilja wrote:
> Juanma Barranquero wrote:
>> On Feb 14, 2008 1:44 AM, Eric Lilja <mindcooler@gmail.com> wrote:
>>
>>> Thanks, I'll try that as soon as the error introduced to coding.c is
>>> fixed so I can bootstrap again. :)
>>
>> Just change the ASLOTs to AREF in the CODING_ATTR_* defines of coding.h
>>
>> Juanma
>>
>>
>>
>
> Thanks, bootstrapping now and enjoying a cup of tea while I wait.
>
>
>
>
I am happy to report that Emacs does indeed not crash on Vista after
reverting the changes to w32.c, using the method suggested by Juanma.
Hopefully a proper fix (because I assume the changes I reverted have
some purpose too) isn't too hard to do.
- Eric
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-14 1:18 ` Eric Lilja
@ 2008-02-14 8:32 ` Jason Rumney
2008-02-14 19:59 ` Eli Zaretskii
2008-02-14 19:47 ` Eli Zaretskii
1 sibling, 1 reply; 36+ messages in thread
From: Jason Rumney @ 2008-02-14 8:32 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
Eric Lilja wrote:
> Eric Lilja wrote:
>> Juanma Barranquero wrote:
>>> On Feb 14, 2008 1:44 AM, Eric Lilja <mindcooler@gmail.com> wrote:
>>>
>>>> Thanks, I'll try that as soon as the error introduced to coding.c is
>>>> fixed so I can bootstrap again. :)
>>>
>>> Just change the ASLOTs to AREF in the CODING_ATTR_* defines of coding.h
>>>
>>> Juanma
>>>
>>>
>>>
>>
>> Thanks, bootstrapping now and enjoying a cup of tea while I wait.
>>
>>
>>
>>
>
> I am happy to report that Emacs does indeed not crash on Vista after
> reverting the changes to w32.c, using the method suggested by Juanma.
> Hopefully a proper fix (because I assume the changes I reverted have
> some purpose too) isn't too hard to do.
One possibility is that user_sid is not large enough to hold the sub
authorities on Vista. One way to check this is to look at the value of
trash in init_user_info just before the crash occurs. That should
contain the size that was required. This code could all be written more
robustly, checking the size and using alloca to temporarily allocate a
larger buffer where necessary.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-14 1:18 ` Eric Lilja
2008-02-14 8:32 ` Jason Rumney
@ 2008-02-14 19:47 ` Eli Zaretskii
2008-02-14 20:12 ` Eric Lilja
1 sibling, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2008-02-14 19:47 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
> From: Eric Lilja <mindcooler@gmail.com>
> Date: Thu, 14 Feb 2008 02:18:36 +0100
>
> I am happy to report that Emacs does indeed not crash on Vista after
> reverting the changes to w32.c, using the method suggested by Juanma.
> Hopefully a proper fix (because I assume the changes I reverted have
> some purpose too) isn't too hard to do.
Could you please compile the program below and run it on Vista with
some file name (a name of any existing file) as a single argument?
Then please post here everything it prints. That might give me enough
information to fix the code.
Thanks.
-------------------------- cut here --------------------
#include <stdio.h>
#include <windows.h>
#include <lmcons.h>
#include <accctrl.h>
#include <aclapi.h>
#include <tchar.h>
BOOL GetTextualSid(
PSID pSid, // binary SID
LPTSTR TextualSid, // buffer for Textual representation of SID
LPDWORD lpdwBufferLen // required/provided TextualSid buffersize
)
{
PSID_IDENTIFIER_AUTHORITY psia;
DWORD dwSubAuthorities;
DWORD dwSidRev=SID_REVISION;
DWORD dwCounter;
DWORD dwSidSize;
// Validate the binary SID.
if(!IsValidSid(pSid)) return FALSE;
// Get the identifier authority value from the SID.
psia = GetSidIdentifierAuthority(pSid);
// Get the number of subauthorities in the SID.
dwSubAuthorities = *GetSidSubAuthorityCount(pSid);
// Compute the buffer length.
// S-SID_REVISION- + IdentifierAuthority- + subauthorities- + NULL
dwSidSize=(15 + 12 + (12 * dwSubAuthorities) + 1) * sizeof(TCHAR);
// Check input buffer length.
// If too small, indicate the proper size and set the last error.
if (*lpdwBufferLen < dwSidSize)
{
*lpdwBufferLen = dwSidSize;
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return FALSE;
}
// Add 'S' prefix and revision number to the string.
dwSidSize=_stprintf(TextualSid,
TEXT("S-%lu-"), dwSidRev );
// Add a SID identifier authority to the string.
if ( (psia->Value[0] != 0) || (psia->Value[1] != 0) )
{
dwSidSize+=_stprintf(TextualSid + lstrlen(TextualSid),
TEXT("0x%02hx%02hx%02hx%02hx%02hx%02hx"),
(USHORT)psia->Value[0],
(USHORT)psia->Value[1],
(USHORT)psia->Value[2],
(USHORT)psia->Value[3],
(USHORT)psia->Value[4],
(USHORT)psia->Value[5]);
}
else
{
dwSidSize+=_stprintf(TextualSid + lstrlen(TextualSid),
TEXT("%lu"),
(ULONG)(psia->Value[5] ) +
(ULONG)(psia->Value[4] << 8) +
(ULONG)(psia->Value[3] << 16) +
(ULONG)(psia->Value[2] << 24) );
}
// Add SID subauthorities to the string.
//
for (dwCounter=0 ; dwCounter < dwSubAuthorities ; dwCounter++)
{
dwSidSize+=_stprintf(TextualSid + dwSidSize,
TEXT("-%lu"),
*GetSidSubAuthority(pSid, dwCounter) );
}
return TRUE;
}
int
main (int argc, char *argv[])
{
SECURITY_INFORMATION si =
OWNER_SECURITY_INFORMATION
| GROUP_SECURITY_INFORMATION
| DACL_SECURITY_INFORMATION;
/* The magic value 244 is returned by GetFileSecurity if one uses
less storage for the three flags above. */
SECURITY_DESCRIPTOR *sd = malloc(244);
const char *arg = (argv[1] ? argv[1] : argv[0]);
DWORD len_needed;
if (!GetFileSecurity (arg, si, sd, 244, &len_needed))
fprintf (stderr, "GetFileSecurity: %lu (%lu/%u)\n",
GetLastError (), len_needed, 244);
else
{
SID *psid, *pgsid;
BOOL deflt, deflt1;
char name[UNLEN + 1], gname[UNLEN + 1];
SID_NAME_USE snu, sng;
char domain[1024];
DWORD nl = UNLEN + 1, gnl = UNLEN + 1;
DWORD dl = 1024, gdl = 1024;
char tusid[1024], tgsid[1024];
DWORD tsidlen = sizeof(tusid);
BOOL daclpresent;
PACL pdacl;
if (!GetSecurityDescriptorOwner (sd, (PSID *)&psid, &deflt))
fprintf (stderr, "GetSecurityDescriptorOwner: %lu\n", GetLastError ());
else if (!LookupAccountSid (NULL, psid, name, &nl,
domain, &dl, &snu))
fprintf (stderr, "LookupAccountSid: %lu\n",
GetLastError ());
else if (!GetTextualSid (psid, tusid, &tsidlen))
fprintf (stderr, "GetTextualSid (owner): %lu\n", GetLastError ());
else if (!GetSecurityDescriptorGroup (sd, (PSID *)&pgsid, &deflt))
fprintf (stderr, "GetSecurityDescriptorGroup: %lu\n", GetLastError ());
else if (!LookupAccountSid (NULL, pgsid, gname, &gnl,
domain, &gdl, &sng))
fprintf (stderr, "LookupAccountSid: %lu\n",
GetLastError ());
else if (!GetTextualSid (pgsid, tgsid, &tsidlen))
fprintf (stderr, "GetTextualSid (group): %lu\n", GetLastError ());
else if (!GetSecurityDescriptorDacl (sd, &daclpresent, &pdacl, &deflt1))
fprintf (stderr, "GetSecurityDescriptorDacl: %lu\n", GetLastError ());
else if (!daclpresent)
fprintf (stderr, "GetSecurityDescriptorDacl: NO DACL\n");
else
{
ACCESS_MASK umask, gmask;
DWORD err;
TRUSTEE trustee = {
NULL, NO_MULTIPLE_TRUSTEE, TRUSTEE_IS_SID, TRUSTEE_IS_USER, NULL
};
trustee.ptstrName = (LPTSTR)psid;
if ((err = GetEffectiveRightsFromAcl (pdacl, &trustee, &umask)) != ERROR_SUCCESS)
fprintf (stderr, "GetEffectiveRightsFromAcl (owner): %lu\n", err);
else if (trustee.TrusteeType = TRUSTEE_IS_GROUP,
trustee.ptstrName = (LPTSTR)pgsid,
(err = GetEffectiveRightsFromAcl (pdacl, &trustee, &gmask)) != ERROR_SUCCESS)
fprintf (stderr, "GetEffectiveRightsFromAcl (group): %lu\n", err);
else
printf ("%s:\n dflt=%d owner=%s grp=%s domain=%s use=%d\n Ownr SID=%s 0x%lx\n Grp SID=%s 0x%lx\n",
arg, deflt, name, gname, domain, snu, tusid, umask, tgsid, gmask);
}
}
return 0;
}
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-14 8:32 ` Jason Rumney
@ 2008-02-14 19:59 ` Eli Zaretskii
0 siblings, 0 replies; 36+ messages in thread
From: Eli Zaretskii @ 2008-02-14 19:59 UTC (permalink / raw)
To: Jason Rumney; +Cc: mindcooler, emacs-devel
> Date: Thu, 14 Feb 2008 08:32:17 +0000
> From: Jason Rumney <jasonr@gnu.org>
> Cc: emacs-devel@gnu.org
>
> > I am happy to report that Emacs does indeed not crash on Vista after
> > reverting the changes to w32.c, using the method suggested by Juanma.
> > Hopefully a proper fix (because I assume the changes I reverted have
> > some purpose too) isn't too hard to do.
>
> One possibility is that user_sid is not large enough to hold the sub
> authorities on Vista. One way to check this is to look at the value of
> trash in init_user_info just before the crash occurs. That should
> contain the size that was required. This code could all be written more
> robustly, checking the size and using alloca to temporarily allocate a
> larger buffer where necessary.
I never liked the way that code casts structures to `PSID *', as in
lookup_account_sid (NULL, *((PSID *) user_sid), name, &length,
This smells of abusing some object by a subtly incompatible pointer.
But that's how that part of the code was written before me, and it
worked on XP and saved me yet another dance with a function that needs
to be called via a pointer after loading a DLL.
Hopefully, the program I sent earlier, if it doesn't crash on Vista,
will give me enough information to rewrite that code in a more robust
way.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-14 19:47 ` Eli Zaretskii
@ 2008-02-14 20:12 ` Eric Lilja
2008-02-14 21:44 ` Eli Zaretskii
0 siblings, 1 reply; 36+ messages in thread
From: Eric Lilja @ 2008-02-14 20:12 UTC (permalink / raw)
To: emacs-devel
Eli Zaretskii wrote:
>> From: Eric Lilja <mindcooler@gmail.com>
>> Date: Thu, 14 Feb 2008 02:18:36 +0100
>>
>> I am happy to report that Emacs does indeed not crash on Vista after
>> reverting the changes to w32.c, using the method suggested by Juanma.
>> Hopefully a proper fix (because I assume the changes I reverted have
>> some purpose too) isn't too hard to do.
>
> Could you please compile the program below and run it on Vista with
> some file name (a name of any existing file) as a single argument?
> Then please post here everything it prints. That might give me enough
> information to fix the code.
>
> Thanks.
>
I had to comment out #include <tchar.h> to get it to compile under
cygwin's gcc in mingw mode. Here's the output from both mingw and visual
c++ 9:
mingw:
$ ./runme.exe source.c
source.c:
dflt=0 owner=Administrat÷rer grp=None domain=mindcool-laptop use=4
Ownr SID=S-1-5-32-544 0x1f01ff
Grp SID=S-1-5-21-2313625805-1149499212-3830963393-513 0x1201ff
vs9:
$ ./source.exe ../../source.c
../../source.c:
dflt=0 owner=Administrat÷rer grp=None domain=mindcool-laptop use=4
Ownr SID=S-1-5-32-544 0x1f01ff
Grp SID=S-1-5-21-2313625805-1149499212-3830963393-513 0x1201ff
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-11 12:11 emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista Eric Lilja
2008-02-11 12:26 ` Jason Rumney
@ 2008-02-14 21:10 ` Eric Hanchrow
1 sibling, 0 replies; 36+ messages in thread
From: Eric Hanchrow @ 2008-02-14 21:10 UTC (permalink / raw)
To: emacs-devel
>>>>> "Eric" == Eric Lilja <mindcooler@gmail.com> writes:
Eric> However, those binaries crashes immediately under Windows
Eric> Vista.
(Greetings, fellow co-conspirator (http://catb.org/~esr/ecsl/))
What do you actually see when it crashes? I ask because _sometimes_
when I start Emacs, I see a popup that says something like "Emacs has
stopped working". The popup has a progress bar which moves left and
right to give the illusion that Windows is looking for a solution to the
problem.
If you're seeing the same thing, then maybe the fix for your problem
will also fix mine ...
--
If you're trying to choose between two theories and one gives
you an excuse for being lazy, the other one is probably right.
-- Paul Graham
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-14 20:12 ` Eric Lilja
@ 2008-02-14 21:44 ` Eli Zaretskii
2008-02-16 17:07 ` Eli Zaretskii
0 siblings, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2008-02-14 21:44 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
> From: Eric Lilja <mindcooler@gmail.com>
> Date: Thu, 14 Feb 2008 21:12:06 +0100
>
> mingw:
> $ ./runme.exe source.c
> source.c:
> dflt=0 owner=Administrat÷rer grp=None domain=mindcool-laptop use=4
> Ownr SID=S-1-5-32-544 0x1f01ff
> Grp SID=S-1-5-21-2313625805-1149499212-3830963393-513 0x1201ff
>
>
>
> vs9:
> $ ./source.exe ../../source.c
> ../../source.c:
> dflt=0 owner=Administrat÷rer grp=None domain=mindcool-laptop use=4
> Ownr SID=S-1-5-32-544 0x1f01ff
> Grp SID=S-1-5-21-2313625805-1149499212-3830963393-513 0x1201ff
Thanks, I will try to fix w32.c when I have time, hopefully soon.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-14 21:44 ` Eli Zaretskii
@ 2008-02-16 17:07 ` Eli Zaretskii
2008-02-16 22:10 ` Eric Lilja
0 siblings, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2008-02-16 17:07 UTC (permalink / raw)
To: mindcooler, emacs-devel
> Date: Thu, 14 Feb 2008 23:44:36 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
>
> Thanks, I will try to fix w32.c when I have time, hopefully soon.
Could you please try again with the latest version in CVS?
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-16 17:07 ` Eli Zaretskii
@ 2008-02-16 22:10 ` Eric Lilja
2008-02-17 4:23 ` Eli Zaretskii
0 siblings, 1 reply; 36+ messages in thread
From: Eric Lilja @ 2008-02-16 22:10 UTC (permalink / raw)
To: emacs-devel
Eli Zaretskii wrote:
>> Date: Thu, 14 Feb 2008 23:44:36 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>> Cc: emacs-devel@gnu.org
>>
>> Thanks, I will try to fix w32.c when I have time, hopefully soon.
>
> Could you please try again with the latest version in CVS?
>
>
>
Still crashes I'm afraid.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-16 22:10 ` Eric Lilja
@ 2008-02-17 4:23 ` Eli Zaretskii
2008-02-17 13:09 ` Eric Lilja
0 siblings, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2008-02-17 4:23 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
> From: Eric Lilja <mindcooler@gmail.com>
> Date: Sat, 16 Feb 2008 23:10:23 +0100
>
> Eli Zaretskii wrote:
> >> Date: Thu, 14 Feb 2008 23:44:36 +0200
> >> From: Eli Zaretskii <eliz@gnu.org>
> >> Cc: emacs-devel@gnu.org
> >>
> >> Thanks, I will try to fix w32.c when I have time, hopefully soon.
> >
> > Could you please try again with the latest version in CVS?
> >
> >
> >
>
> Still crashes I'm afraid.
Hmm... there's something I'm missing here, obviously.
Could you please again step through the call to
get_sid_sub_authority_count, and print the value of pSid at each step?
The command "display/x pSid" should do that; please type this command
as soon as you step into get_sid_sub_authority_count, and then
continue with the "next" command until the crash. I also need the to
see value of user_token.User.Sid inside init_user_info, immediately
before the call to get_sid_sub_authority_count.
Thanks, and sorry for the mess.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-17 4:23 ` Eli Zaretskii
@ 2008-02-17 13:09 ` Eric Lilja
2008-02-17 15:09 ` Eli Zaretskii
0 siblings, 1 reply; 36+ messages in thread
From: Eric Lilja @ 2008-02-17 13:09 UTC (permalink / raw)
To: emacs-devel
Eli Zaretskii wrote:
>> From: Eric Lilja <mindcooler@gmail.com>
>> Date: Sat, 16 Feb 2008 23:10:23 +0100
>>
>> Eli Zaretskii wrote:
>>>> Date: Thu, 14 Feb 2008 23:44:36 +0200
>>>> From: Eli Zaretskii <eliz@gnu.org>
>>>> Cc: emacs-devel@gnu.org
>>>>
>>>> Thanks, I will try to fix w32.c when I have time, hopefully soon.
>>> Could you please try again with the latest version in CVS?
>>>
>>>
>>>
>> Still crashes I'm afraid.
>
> Hmm... there's something I'm missing here, obviously.
>
> Could you please again step through the call to
> get_sid_sub_authority_count, and print the value of pSid at each step?
> The command "display/x pSid" should do that; please type this command
> as soon as you step into get_sid_sub_authority_count, and then
> continue with the "next" command until the crash. I also need the to
> see value of user_token.User.Sid inside init_user_info, immediately
> before the call to get_sid_sub_authority_count.
>
> Thanks, and sorry for the mess.
>
>
>
As you know, I'm not very good at gdb. I had some problems when
debugging this (and here I'm refering to the "Cannot find bounds of
current function", see below). Hope this log helps, if not, I can
attempt to redo it in a proper way, with your guidance.
$ gdb ./oo-spd/i386/emacs.exe
GNU gdb 6.5.50.20060706-cvs (cygwin-special)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
Environment variable "DISPLAY" not defined.
TERM = cygwin
Breakpoint 1 at 0x114b0c4: file w32fns.c, line 9317.
Breakpoint 2 at 0x10a0434: file sysdep.c, line 1319.
(gdb) break init_user_info
Breakpoint 3 at 0x1080f9c: file w32.c, line 599.
(gdb) run -Q
Starting program: /home/mindcooler/emacs/src/oo-spd/i386/emacs.exe -Q
Loaded symbols for /cygdrive/c/Windows/system32/ntdll.dll
Loaded symbols for /cygdrive/c/Windows/system32/kernel32.dll
Loaded symbols for /cygdrive/c/Windows/system32/msvcrt.dll
Loaded symbols for /cygdrive/c/Windows/system32/advapi32.dll
Loaded symbols for /cygdrive/c/Windows/system32/rpcrt4.dll
Loaded symbols for
/cygdrive/c/Windows/WinSxS/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6000.16386_none_5d07289e07e1d100/comctl32.dll
Loaded symbols for /cygdrive/c/Windows/system32/gdi32.dll
Loaded symbols for /cygdrive/c/Windows/system32/user32.dll
Loaded symbols for /cygdrive/c/Windows/system32/shlwapi.dll
Loaded symbols for /cygdrive/c/Windows/system32/comdlg32.dll
Loaded symbols for /cygdrive/c/Windows/system32/shell32.dll
Loaded symbols for /cygdrive/c/Windows/system32/mpr.dll
Loaded symbols for /cygdrive/c/Windows/system32/ole32.dll
Loaded symbols for /cygdrive/c/Windows/system32/winmm.dll
Loaded symbols for /cygdrive/c/Windows/system32/oleaut32.dll
Loaded symbols for /cygdrive/c/Windows/system32/oleacc.dll
Loaded symbols for /cygdrive/c/Windows/system32/winspool.drv
Breakpoint 3, init_user_info () at w32.c:599
599 DWORD length = sizeof (name), dlength = sizeof
(domain), trash;
(gdb) n
600 HANDLE token = NULL;
(gdb) n
606 if (open_process_token (GetCurrentProcess (), TOKEN_QUERY, &token)
(gdb) n
613 strcpy (the_passwd.pw_name, name);
(gdb) s
615 if (stricmp ("administrator", name) == 0)
(gdb) s
624 DWORD n_subauthorities =
(gdb) print user_token.User.Sid
$1 = (PSID) 0x82ea68
(gdb) s
get_sid_sub_authority_count (pSid=0x82ea68) at w32.c:389
389 {
(gdb) display/x pSid
1: /x pSid = 0x82f270
(gdb) n
393 if (is_windows_9x () == TRUE)
1: /x pSid = 0x82ea68
(gdb) n
397 if (g_b_init_get_sid_sub_authority_count == 0)
1: /x pSid = 0x82ea68
(gdb) n
405 if (s_pfn_Get_Sid_Sub_Authority_Count == NULL)
1: /x pSid = 0x82ea68
(gdb) n
409 return (s_pfn_Get_Sid_Sub_Authority_Count (pSid));
1: /x pSid = 0x82ea68
(gdb) n
410 }
1: /x pSid = 0x82ea68
(gdb) n
get_sid_sub_authority_count (pSid=0x0) at w32.c:409
409 return (s_pfn_Get_Sid_Sub_Authority_Count (pSid));
1: /x pSid = 0x82f270
(gdb) n
0x77df986b in ?? ()
(gdb) n
Cannot find bounds of current function
(gdb) n
Cannot find bounds of current function
(gdb) n
Cannot find bounds of current function
(gdb) s
Cannot find bounds of current function
(gdb) step out
No symbol "out" in current context.
(gdb) n
Cannot find bounds of current function
(gdb) continue
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x77df986b in ?? ()
(gdb) bt
#0 0x77df986b in ?? ()
#1 0x010811cd in init_user_info () at w32.c:624
#2 0x010839b0 in init_environment (argv=0x922960) at w32.c:1303
#3 0x0100260e in main (argc=2, argv=0x922960) at emacs.c:1506
(gdb)
This was with a fresh checkout performed just an hour ago.
- Eric
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-17 13:09 ` Eric Lilja
@ 2008-02-17 15:09 ` Eli Zaretskii
2008-02-17 15:47 ` Eric Lilja
0 siblings, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2008-02-17 15:09 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
> From: Eric Lilja <mindcooler@gmail.com>
> Date: Sun, 17 Feb 2008 14:09:33 +0100
>
> 405 if (s_pfn_Get_Sid_Sub_Authority_Count == NULL)
> 1: /x pSid = 0x82ea68
> (gdb) n
> 409 return (s_pfn_Get_Sid_Sub_Authority_Count (pSid));
> 1: /x pSid = 0x82ea68
At this point, i.e. _before_ line 409, please type these commands, and
tell me what they printed:
p ((SID *)pSid)->Revision
p ((SID *)pSid)->SubAuthorityCount
p *((SID *)pSid)->SubAuthority@7
Also, I see that you run Emacs on the Vista as administrator. Could
you please try running it as an ordinary user, and see if it still
crashes? For that matter, does it work on XP if you run Emacs as
administrator?
Thanks again for helping me debug this.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-17 15:09 ` Eli Zaretskii
@ 2008-02-17 15:47 ` Eric Lilja
2008-02-17 15:51 ` Eric Lilja
2008-02-17 16:46 ` Eli Zaretskii
0 siblings, 2 replies; 36+ messages in thread
From: Eric Lilja @ 2008-02-17 15:47 UTC (permalink / raw)
To: emacs-devel
Eli Zaretskii wrote:
>> From: Eric Lilja <mindcooler@gmail.com>
>> Date: Sun, 17 Feb 2008 14:09:33 +0100
>>
>> 405 if (s_pfn_Get_Sid_Sub_Authority_Count == NULL)
>> 1: /x pSid = 0x82ea68
>> (gdb) n
>> 409 return (s_pfn_Get_Sid_Sub_Authority_Count (pSid));
>> 1: /x pSid = 0x82ea68
>
> At this point, i.e. _before_ line 409, please type these commands, and
> tell me what they printed:
>
> p ((SID *)pSid)->Revision
> p ((SID *)pSid)->SubAuthorityCount
> p *((SID *)pSid)->SubAuthority@7
Hope I got this right:
(gdb) n
405 if (s_pfn_Get_Sid_Sub_Authority_Count == NULL)
(gdb) p ((SID *)pSid)->Revision
$1 = 1 '\001'
(gdb) p ((SID *)pSid)->SubAuthorityCount
$2 = 5 '\005'
(gdb) p ((SID *)pSid)->SubAuthority@7
$3 = {{21}, {2313625805}, {1149499212}, {3830963393}, {1000},
{59246848}, {8579528}}
(gdb)
>
> Also, I see that you run Emacs on the Vista as administrator. Could
> you please try running it as an ordinary user, and see if it still
> crashes? For that matter, does it work on XP if you run Emacs as
> administrator?
>
> Thanks again for helping me debug this.
>
>
>
I will have to get back to you on that one, I'm not familiar with
setting up other users under Vista. In fact, I'm not very familiar with
Vista at all. I just got the laptop that came with it.
However, I am running XP using an administrator account.
Hope this information helps in the meantime.
- Eric
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-17 15:47 ` Eric Lilja
@ 2008-02-17 15:51 ` Eric Lilja
2008-02-17 16:48 ` Eli Zaretskii
2008-02-17 16:46 ` Eli Zaretskii
1 sibling, 1 reply; 36+ messages in thread
From: Eric Lilja @ 2008-02-17 15:51 UTC (permalink / raw)
To: emacs-devel
Eric Lilja wrote:
> Eli Zaretskii wrote:
>>> From: Eric Lilja <mindcooler@gmail.com>
>>> Date: Sun, 17 Feb 2008 14:09:33 +0100
>>>
>>> 405 if (s_pfn_Get_Sid_Sub_Authority_Count == NULL)
>>> 1: /x pSid = 0x82ea68
>>> (gdb) n
>>> 409 return (s_pfn_Get_Sid_Sub_Authority_Count (pSid));
>>> 1: /x pSid = 0x82ea68
>>
>> At this point, i.e. _before_ line 409, please type these commands, and
>> tell me what they printed:
>>
>> p ((SID *)pSid)->Revision
>> p ((SID *)pSid)->SubAuthorityCount
>> p *((SID *)pSid)->SubAuthority@7
>
> Hope I got this right:
> (gdb) n
> 405 if (s_pfn_Get_Sid_Sub_Authority_Count == NULL)
> (gdb) p ((SID *)pSid)->Revision
> $1 = 1 '\001'
> (gdb) p ((SID *)pSid)->SubAuthorityCount
> $2 = 5 '\005'
> (gdb) p ((SID *)pSid)->SubAuthority@7
> $3 = {{21}, {2313625805}, {1149499212}, {3830963393}, {1000},
> {59246848}, {8579528}}
> (gdb)
>
>>
>> Also, I see that you run Emacs on the Vista as administrator. Could
>> you please try running it as an ordinary user, and see if it still
>> crashes? For that matter, does it work on XP if you run Emacs as
>> administrator?
>>
>> Thanks again for helping me debug this.
>>
>>
>>
>
> I will have to get back to you on that one, I'm not familiar with
> setting up other users under Vista. In fact, I'm not very familiar with
> Vista at all. I just got the laptop that came with it.
> However, I am running XP using an administrator account.
I created a normal user account, didn't try debugging or anything, just
tried to start emacs with -Q and it crashes.
>
> Hope this information helps in the meantime.
>
> - Eric
>
>
>
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-17 15:47 ` Eric Lilja
2008-02-17 15:51 ` Eric Lilja
@ 2008-02-17 16:46 ` Eli Zaretskii
2008-02-17 16:59 ` Eric Lilja
1 sibling, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2008-02-17 16:46 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
> From: Eric Lilja <mindcooler@gmail.com>
> Date: Sun, 17 Feb 2008 16:47:16 +0100
>
> >> 409 return (s_pfn_Get_Sid_Sub_Authority_Count (pSid));
> >> 1: /x pSid = 0x82ea68
> >
> > At this point, i.e. _before_ line 409, please type these commands, and
> > tell me what they printed:
> >
> > p ((SID *)pSid)->Revision
> > p ((SID *)pSid)->SubAuthorityCount
> > p *((SID *)pSid)->SubAuthority@7
>
> Hope I got this right:
> (gdb) n
> 405 if (s_pfn_Get_Sid_Sub_Authority_Count == NULL)
> (gdb) p ((SID *)pSid)->Revision
> $1 = 1 '\001'
> (gdb) p ((SID *)pSid)->SubAuthorityCount
> $2 = 5 '\005'
> (gdb) p ((SID *)pSid)->SubAuthority@7
> $3 = {{21}, {2313625805}, {1149499212}, {3830963393}, {1000},
> {59246848}, {8579528}}
> (gdb)
Almost: you forgot the leading asterisk in the last command, right
after "p":
p *((SID *)pSid)->SubAuthority@7
Please tell me what this prints.
The rest looks good: the information is there, it's just that Vista
somehow refuses to produce it, or so it seems. Hmm...
Thanks.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-17 15:51 ` Eric Lilja
@ 2008-02-17 16:48 ` Eli Zaretskii
0 siblings, 0 replies; 36+ messages in thread
From: Eli Zaretskii @ 2008-02-17 16:48 UTC (permalink / raw)
To: Eric Lilja; +Cc: emacs-devel
> From: Eric Lilja <mindcooler@gmail.com>
> Date: Sun, 17 Feb 2008 16:51:49 +0100
>
> I created a normal user account, didn't try debugging or anything, just
> tried to start emacs with -Q and it crashes.
This rejects yet another hypothesis.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista
2008-02-17 16:46 ` Eli Zaretskii
@ 2008-02-17 16:59 ` Eric Lilja
0 siblings, 0 replies; 36+ messages in thread
From: Eric Lilja @ 2008-02-17 16:59 UTC (permalink / raw)
To: emacs-devel
Eli Zaretskii wrote:
>> From: Eric Lilja <mindcooler@gmail.com>
>> Date: Sun, 17 Feb 2008 16:47:16 +0100
>>
>>>> 409 return (s_pfn_Get_Sid_Sub_Authority_Count (pSid));
>>>> 1: /x pSid = 0x82ea68
>>> At this point, i.e. _before_ line 409, please type these commands, and
>>> tell me what they printed:
>>>
>>> p ((SID *)pSid)->Revision
>>> p ((SID *)pSid)->SubAuthorityCount
>>> p *((SID *)pSid)->SubAuthority@7
>> Hope I got this right:
>> (gdb) n
>> 405 if (s_pfn_Get_Sid_Sub_Authority_Count == NULL)
>> (gdb) p ((SID *)pSid)->Revision
>> $1 = 1 '\001'
>> (gdb) p ((SID *)pSid)->SubAuthorityCount
>> $2 = 5 '\005'
>> (gdb) p ((SID *)pSid)->SubAuthority@7
>> $3 = {{21}, {2313625805}, {1149499212}, {3830963393}, {1000},
>> {59246848}, {8579528}}
>> (gdb)
>
> Almost: you forgot the leading asterisk in the last command, right
> after "p":
>
> p *((SID *)pSid)->SubAuthority@7
>
> Please tell me what this prints.
>
> The rest looks good: the information is there, it's just that Vista
> somehow refuses to produce it, or so it seems. Hmm...
>
> Thanks.
>
>
>
Sorry about that, here's what I get. Quite similar output:
(gdb) p *((SID *)pSid)->SubAuthority@7
$3 = {21, 2313625805, 1149499212, 3830963393, 1000, 60098816, 8579528}
I'm having a close watch on my email to see if there are any more tests
you would like me to perform. Thank you very much for working on this.
- Eric
^ permalink raw reply [flat|nested] 36+ messages in thread
end of thread, other threads:[~2008-02-17 16:59 UTC | newest]
Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 12:11 emacs 23.0.60.1 built today (11th feb 2008) crashes under Vista Eric Lilja
2008-02-11 12:26 ` Jason Rumney
2008-02-11 12:30 ` Eric Lilja
2008-02-11 12:40 ` Jason Rumney
2008-02-11 12:48 ` Eric Lilja
2008-02-11 12:51 ` Jason Rumney
2008-02-11 13:10 ` Eric Lilja
2008-02-11 21:52 ` Eli Zaretskii
2008-02-11 22:57 ` Eric Lilja
2008-02-12 4:14 ` Eli Zaretskii
2008-02-12 9:49 ` Eric Lilja
2008-02-13 20:22 ` Eli Zaretskii
2008-02-13 22:57 ` Eric Lilja
2008-02-14 0:03 ` Juanma Barranquero
2008-02-14 0:44 ` Eric Lilja
2008-02-14 0:54 ` Juanma Barranquero
2008-02-14 1:06 ` Eric Lilja
2008-02-14 1:18 ` Eric Lilja
2008-02-14 8:32 ` Jason Rumney
2008-02-14 19:59 ` Eli Zaretskii
2008-02-14 19:47 ` Eli Zaretskii
2008-02-14 20:12 ` Eric Lilja
2008-02-14 21:44 ` Eli Zaretskii
2008-02-16 17:07 ` Eli Zaretskii
2008-02-16 22:10 ` Eric Lilja
2008-02-17 4:23 ` Eli Zaretskii
2008-02-17 13:09 ` Eric Lilja
2008-02-17 15:09 ` Eli Zaretskii
2008-02-17 15:47 ` Eric Lilja
2008-02-17 15:51 ` Eric Lilja
2008-02-17 16:48 ` Eli Zaretskii
2008-02-17 16:46 ` Eli Zaretskii
2008-02-17 16:59 ` Eric Lilja
2008-02-14 0:57 ` Kenichi Handa
2008-02-12 17:45 ` Richard Stallman
2008-02-14 21:10 ` Eric Hanchrow
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.