This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Reinstall libncurses7 after rebasing (was: emacs hangs at start, or sometime later)


ahnkle wrote:
> hi,
> 
> I am having some problems with my emacs. I have 21.2-13 installed, and recently it started 
> locking up after some time, from ~1 hour to 3-4 hours. The window would not repaint. The 
> emacs process usage goes up to 50%, then close to 100%, until the process is killed.
> 
> Then I tried rebaseall. It just brok  emacs, emacs hung at startup. I have 
> re-installed 21.2.13, and ncurses (mentioned in an old post), and X packages, and am back to
> emacs running for 'some period', then locking up.
> 
> 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

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]