X-Spam-Check-By: sourceware.org Message-ID: <453039BD.5060109@pobox.com> Date: Fri, 13 Oct 2006 21:13:33 -0400 From: "Sean M. Paus" User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Reinstall libncurses7 after rebasing (was: emacs hangs at start, or sometime later) References: <20061013135717 DOT GA15845 AT flixx DOT linux DOT bogus> In-Reply-To: <20061013135717.GA15845@flixx.linux.bogus> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDEEA3D0CBA11DB3E454EC6D3" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------enigDEEA3D0CBA11DB3E454EC6D3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable ahnkle wrote: > hi, >=20 > I am having some problems with my emacs. I have 21.2-13 installed, and re= cently it started=20 > locking up after some time, from ~1 hour to 3-4 hours. The window would n= ot repaint. The=20 > emacs process usage goes up to 50%, then close to 100%, until the process= is killed. >=20 > Then I tried rebaseall. It just brok emacs, emacs hung at startup. I hav= e=20 > re-installed 21.2.13, and ncurses (mentioned in an old post), and X packa= ges, and am back to > emacs running for 'some period', then locking up. >=20 > Any ideas about where next? I encountered this problem over a year ago. You need to reinstall libncurses7. That undoes the rebasing of it's dlls. For some weird reason (that no one is able to explain), rebasing libncurses7 dlls fixes this problem. I have narrowed down the problem in the emacs sources to an infinite loop in morecore (gmalloc.c). align(...) returns a pointer that is less than _heapbase (which shouldn't ever happen) causing the do/while loop that increases the new heap size to overflow newsize. Since newsize is an unsigned, overflowing sets the value to zero (0). Multiplying 0 by 2 always results in 0 so the check to make sure the new size is sufficient always fails. I can only imagine why this is happening. I assume that emacs's implementation of malloc is not being initialized properly (if at all). Perhaps libncurses7.dll is doing something that makes emacs.exe think it's implementation of malloc has been initialzed. I tried breaking in __malloc_initialize in gdb and never hit it. I don't fully understand what rebasing the dlls does, but it looks like it might have something to do with the order they are loaded. My best guess is that libncurses7.dll is modifying variables used by emacs for memory allocation. Hope this helps. Sean --------------enigDEEA3D0CBA11DB3E454EC6D3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFMDm+ulyT9+vyDFcRAs7xAJ9HLB7nHru8JDz8EVAo+Pf+y4Mo0wCdH7Tm 9yDmsW00+RH79cVkeyzhSAI= =+Zzj -----END PGP SIGNATURE----- --------------enigDEEA3D0CBA11DB3E454EC6D3--