🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99285

SunOS 4.1 problem

#99285
From: Richard Evans
Date: Tue, 09 Oct 1990 16:19
40 lines
2236 bytes
I read the Sun STB (March 90, page 27) article on emacs aborting when run under
SunOS 4.1.  I relinked emacs this afternoon and indeed this happened.  I don't
know whether this is of any interest, but I believe I have tracked down the
problem (and it's NOT a bug in emacs' memory allocation!).

This all refers to GNU Emacs 18.55 with the standard loadup.el running under
SunOS 4.1 on a Sparcstation.

The abort is caused by:

  if (p -> mh_alloc != ISFREE || p -> mh_index != nunits)
#ifdef rcheck
    botch ("block on free list clobbered");
#else /* not rcheck */
    abort ();
#endif /* not rcheck */

in malloc.c.  The problem is that the struct mhead at 0xab560 has 0 as the
mh_alloc field, not ISFREE.  The byte was overwritten when xemacs was dumped
by:

temacs -batch -l loadup.el dump

Using gdb and some patience I discovered that the block before the corrupted
one was allocated during the call to `ctime' in Fcurrent_time_string.  The
block was allocated by a malloc(8), but byte offset 9 was set to zero!  The
actual call was by calloc called from tzset/tzsetwall.

I patched the byte in xemacs back to ISFREE and it now works fine (I'm using it
to compose this message).

I hope this helps.

-------------------------------------------------------------------------------
Richard Evans			 	Telephone : (+44) 223 462121   
Topexpress Ltd			 	Telex     : 817911 Topexp G 
Poseidon House, Castle Park	 	Fax       : (+44) 223 315057   
Cambridge, CB3 0RD, UK		 	E-Mail    : rde@topexpress.co.uk
-------------------------------------------------------------------------------
Technical Details
Message-ID: <6986.9010091619@igor.topexp.co.uk>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!world!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!topexpress.co.uk!rde

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,2fe0e74f2659bfe6,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-10-09 23:05:04 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!world!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!topexpress.co.uk!rde
From: rde@topexpress.co.uk (Richard Evans)
Newsgroups: gnu.emacs.bug
Subject: SunOS 4.1 problem
Message-ID: <6986.9010091619@igor.topexp.co.uk>
Date: 9 Oct 90 16:19:27 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 40
Posted: Tue Oct  9 17:19:27 1990