From: frazer AT rtp DOT ericsson DOT se (Scott Frazer) Newsgroups: comp.os.msdos.djgpp Subject: Re: emacs 19.34 crashes immediately on win nt 4.0 Date: Wed, 05 Mar 1997 16:34:44 GMT Organization: Ericsson Data Services Americas Lines: 82 Message-ID: <331d9fbf.1804608@cnn.exu.ericsson.se> References: NNTP-Posting-Host: pc093.rtp.ericsson.se To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Eli Zaretskii wrote: >Before we conclude that the NT DPMI host has a bug, please try to put >a reasonable value into info.size, so we know that it doesn't puke >because the garbage there seems like you are asking for too much DOS >memory. > >Also, try to compile the program with the Unixy sbrk (that's how Emacs >is built) and see if that makes any difference. Okay, here's the new test.c: /* test.c */ #include #include int _crt0_startup_flags = _CRT0_FLAG_UNIX_SBRK; int main( void ) { _go32_dpmi_seginfo info; info.size = 4; _go32_dpmi_allocate_dos_memory ( &info ); _go32_dpmi_free_dos_memory ( &info ); return( 0 ); } compile and run: C:\test\emacs>gcc -Wall -g -o test.exe test.c C:\test\emacs>gdb test.exe GDB is free software and you are welcome to 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. GDB 4.16 (go32), Copyright 1996 Free Software Foundation, Inc... (gdb) break main Breakpoint 1 at 0x155b: file test.c, line 12. (gdb) run Starting program: c:/test/emacs/test.exe Breakpoint 1, main () at test.c:12 12 info.size = 4; (gdb) step 13 _go32_dpmi_allocate_dos_memory ( &info ); (gdb) step 14 _go32_dpmi_free_dos_memory ( &info ); (gdb) nexti 0x1571 14 _go32_dpmi_free_dos_memory ( &info ); (gdb) nexti 0x1572 14 _go32_dpmi_free_dos_memory ( &info ); (gdb) nexti Program received signal SIGSEGV, Segmentation fault. 0x346b in _get_volume_info () (gdb) info all-registers eax 0x257 599 ecx 0x4a288 303752 edx 0x257 599 ebx 0x4d320 316192 esp 0x3542 0x3542 ebp 0x43548 0x43548 esi 0xd7 215 edi 0xa2d4 41684 eip 0x346b 0x346b ps 0x13256 78422 cs 0xc7 199 ss 0xb7 183 ds 0xb7 183 es 0xd7 215 fs 0x217 535 gs 0x24f 591 (gdb) The same thing happens ( can't vouch for the registers obviously ) without the Unixy sbrk. Scott