Date: Sat, 12 Jul 1997 01:06:01 -0700 (PDT) From: Phil Galbiati Reply-To: Phil Galbiati To: Eli Zaretskii cc: djgpp AT delorie DOT com, Esa DOT Peuha AT Helsinki DOT FI Subject: Re: Emacs 22 env vars bug In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 10 Jul 1997, Eli Zaretskii wrote: > > On Thu, 10 Jul 1997, Esa A E Peuha wrote: > > > However, it doesn't crash with this bug. Are you sure that > > patched library isn't affecting this bug? > > I have relinked Emacs with stock v2.01 libc.a, and I still get crashes > with 22 env vars. Are you sure you linked with the original v2.01 libc? > The copy that's in my djdev201.zip has this timestamp and size: > > 644496 10-28-96 22:20 lib/libc.a I have been not-so-dilligently following this thread, mostly out of curiousity, and so I decided to rebuild emacs. I modified src/makefile to generate a map & cross reference to see if I could symify the stack dump by hand (after all, putting the debug info into the object files changes the locations of the function entry points, doesn't it?). Anyway, I have a few observations: 1) The libc.a size & timestamp from djdev201 as uploaded 18 Jan 97 is 643,206 10-31-96 7:13p LIBC.A 2) When I run "config --no-debug msdos" from the emacs directory, and then "make install", under either dos6.2 or w95, it builds an executable the same size as that in the emacs binary distribution; however, the timestamps embedded from the stub $ID$ strings are different: yours: $Id: stub.asm built 10/05/96 20:49:00 by djasm mine: $Id: stub.asm built 08/26/96 21:04:04 by djasm There are also visible differences in the non-printable portions of the executable, one of which can be seen on line 13, character #10 when viewing the emacs.exe file using emacs. 3) Under DOS6.2, your executable crashes when 22 env vars are set, but mine does not. Under w95 dos box, I can't get either of them to crash. 4) Assuming that a) the two stubs are the same size, b) the only other differences are from your patched libc, and c) all the functions included from libc wind up at the end of the executable, then the crash traceback from your exe should be symifiable using the map from my exe: -------------------------------------------------------------- Exiting due to signal SIGSEGV General Protection Fault at eip=000761a6 eax=32334f47 ebx=00119000 ecx=00112000 edx=0000000a esi=00119b00 edi=00000008 ebp=001df21c esp=001df1e8 program=c:\djgpp\gnu\emacs34\bin\EMACS.EXE cs: sel=00af base=81794000 limit=0022ffff ds: sel=00b7 base=81794000 limit=0022ffff es: sel=00b7 base=81794000 limit=0022ffff fs: sel=008f base=000228c0 limit=0000ffff gs: sel=00d7 base=00000000 limit=ffffffff ss: sel=00b7 base=81794000 limit=0022ffff Call frame traceback EIPs: 0x000761a6 _free_internal + 0x466 (gmalloc.o) 0x0007642e _realloc_internal + 0x1f2 (gmalloc.o) 0x0007646a realloc + 0x032 (gmalloc.o) 0x000491cb refill_memory_reserve + 0x0a7 (alloc.o) 0x0007646a realloc + 0x032 (gmalloc.o) 0x000432d4 re_set_syntax + 0xbfc (regex.o) 0x00048360 re_compile_pattern + 0x024 (regex.o) 0x0003f495 compile_pattern_1 + 0x051 (search.o) 0x0003f558 compile_pattern + 0x054 (search.o) 0x0003f898 Fposix_looking_at + 0x0f8 (search.o) 0x0003f927 Fstring_match + 0x013 (search.o) -------------------------------------------------------------- The numbers to the right of the symbol names are byte-offsets from those symbols (sorry, I don't know a quick way to get line numbers out of that). Also, I had to edit search.c to make all of the staticly scoped functions external in order to resolve 0x0003f495. Please let me know which parts of all of this are of help (if any). --p