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, 26 Feb 1997 17:56:52 GMT Organization: Ericsson Data Services Americas Message-ID: <33147476.5759936@cnn.exu.ericsson.se> References: NNTP-Posting-Host: pc093.rtp.ericsson.se Lines: 122 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Eli Zaretskii wrote: >I would still like to know whether a small test program that allocates and >deallocates DOS memory crashes on NT (it might be something specific to >Emacs). Eli/Charles, Hi, I'm back trying to help fix the emacs crashing under WinNT v4.0 problem. 1) I tried Charles' suggestion about getting rid of the ax = 0x3800 call. I assume he meant this: /* Obtain the country code by calling Dos via Dpmi. Don't rely on GO32. */ info.size = (sizeof(dos_country_info) + 15) / 16; if (_go32_dpmi_allocate_dos_memory (&info)) dos_country_code = 1; else { /* dpmiregs.x.ax = 0x3800; dpmiregs.x.ds = info.rm_segment; dpmiregs.x.dx = 0; dpmiregs.x.ss = dpmiregs.x.sp = 0; _go32_dpmi_simulate_int (0x21, &dpmiregs); dos_country_code = dpmiregs.x.bx; dosmemget (info.rm_segment * 16, DOS_COUNTRY_INFO, dos_country_info); */ dos_country_code = 1; _go32_dpmi_free_dos_memory (&info); } This causes the same startup SIGSEGV that was happening before. 2) I made the following test program: /* test.c */ #include int main( void ) { _go32_dpmi_seginfo info; _go32_dpmi_allocate_dos_memory ( &info ); _go32_dpmi_free_dos_memory ( &info ); return( 0 ); } compiled and ran it: C:\test>gcc -Wall -o test.exe test.c C:\test>test Exiting due to signal SIGSEGV General Protection Fault at eip=0000346b eax=000001ef ebx=0004d2c0 ecx=0004a288 edx=000001ef esi=000000d7 edi=0000a2d4 ebp=00043248 esp=00003242 program=C:\TEST\TEST.EXE cs: sel=00c7 base=00110800 limit=00005ef0 ds: sel=00b7 base=000cc1f0 limit=0000ffff es: sel=00d7 base=001166f0 limit=00005fff fs: sel=019f base=000050b0 limit=0000ffff gs: sel=01df base=00000000 limit=7ffeffff ss: sel=00b7 base=000cc1f0 limit=0000ffff C:\test> Okay, let's debug: C:\test>gcc -Wall -g -o test.exe test.c C:\test>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 9. (gdb) run Starting program: c:/test/test.exe Breakpoint 1, main () at test.c:9 9 _go32_dpmi_allocate_dos_memory ( &info ); (gdb) step 10 _go32_dpmi_free_dos_memory ( &info ); (gdb) nexti 0x156a 10 _go32_dpmi_free_dos_memory ( &info ); (gdb) nexti 0x156b 10 _go32_dpmi_free_dos_memory ( &info ); (gdb) nexti Program received signal SIGSEGV, Segmentation fault. 0x346b in _get_volume_info () (gdb) info all-registers eax 0x23f 575 ecx 0x4a288 303752 edx 0x23f 575 ebx 0x4d320 316192 esp 0x2f42 0x2f42 ebp 0x42f48 0x42f48 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 0x237 567 (gdb) Any suggestions? Scott