X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Thu, 2 May 2002 18:53:27 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: ahelm AT gmx DOT net cc: djgpp AT delorie DOT com Subject: Re: segfault on context switch In-Reply-To: <31542.1020351804@www41.gmx.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 2 May 2002 ahelm AT gmx DOT net wrote: > Usually it means that memory is corrupted somewhere before > malloc() is called, but why does this only happen on Alt-TAB??? > > The segfault doesn't happen at the same malloc() call each time. > But so far I've only seen it originating from functions invoked > by the bison parser I use for parsing the serial input (which > isn't really surprising as it is running most of the time). Is it possible that a context switch exposes some bug in handling the serial input? It could do that if the code which receives characters from the serial port doesn't cope well with some phenomenon that happens during the context switch. Such a phenomenon could be related to the fact that a context switch might cause Windows to change something in its DOS emulation's handling of serial input (since Windows needs to virtualize the COM port).