This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: [64bit] emacs is unable to call subprocesses if display-time-mode is set
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Wed, 3 Apr 2013 22:02:08 +0200
- Subject: Re: [64bit] emacs is unable to call subprocesses if display-time-mode is set
- References: <51598232 dot 5020505 at cornell dot edu> <5159B006 dot 3060100 at cornell dot edu> <515B1DA4 dot 3020502 at cornell dot edu> <20130402190027 dot GC2468 at calimero dot vinschen dot de> <515B624A dot 4070102 at cornell dot edu> <20130403114102 dot GA31598 at calimero dot vinschen dot de> <515C3358 dot 7080108 at cornell dot edu> <20130403140535 dot GC31598 at calimero dot vinschen dot de> <515C6E2E dot 7080201 at cornell dot edu> <20130403190354 dot GJ2468 at calimero dot vinschen dot de>
- Reply-to: cygwin-developers at cygwin dot com
On Apr 3 21:03, Corinna Vinschen wrote:
> On Apr 3 14:00, Ken Brown wrote:
> > On 4/3/2013 10:05 AM, Corinna Vinschen wrote:
> > >I can reproduce the issue but it's tricky to debug. The exception
> > >occurs in the forked process and GDB can't follow fork on Cygwin.
> > >
> > >Btw., can you create an emacs which is built without optimization
> > >and non-stripped this would simplify debuigging a bit...
> >
> > It was already built without optimization. I'm working on building
> > a non-stripped version, but cygport isn't cooperating. If you put
> > "RESTRICT=strip" into the .cygport file, then cygport doesn't
> > package the sources. So you get a binary with debugging symbols,
> > but you don't get the corresponding sources.
> >
> > I'll send Yaakov a patch, but in the meantime I'm working around
> > this. It shouldn't be long.
>
> I'm still debugging this and something is very fishy when building
> the environment for a process-to-exec. I tracked it down to a
> specific string duplication in Cygwin's build_env function which
> seems to overwrite administrative data on the cygheap for some
> reason I didn't quite follow yet.
>
> This may take some time...
I found it. When using the display-time-mode option, emacs opens and
reads /proc/loadavg. The problem was that the buffer allocated in
format_proc_loadavg is too small, so the subsequent sprintf overwrites
unrelated data on the cygheap.
In fact, this problem occurs on 32 bit as well, so I fixed it in CVS
HEAD in the first place. It's kind of a miracle that this has never
been encountered in the 32 bit version before. The problem exists
since at least Cygwin 1.7.10.
I'm going to build a new 64 bit Cygwin right now, which I will upload
in half an hour or so. Please give it a try.
Thanks for the report and the instructions how to track down the
problem.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat