X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Thu, 2 May 2002 17:03:24 +0200 (MEST) From: ahelm AT gmx DOT net To: djgpp AT delorie DOT com MIME-Version: 1.0 Subject: segfault on context switch X-Priority: 3 (Normal) X-Authenticated-Sender: #0003579562 AT gmx DOT net X-Authenticated-IP: [194.201.128.5] Message-ID: <31542.1020351804@www41.gmx.net> X-Mailer: WWW-Mail 1.5 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Hi, I'm having some troubles with a djgpp compiled program. The program is reading/writing data from/to a com port using the svasync library. No problems in plain DOS, but when I'm running WinNT4.0 and do a context switch (Alt-TAB) while the program is running I get a segfault in malloc(). No problems without context switch though ... Does that ring a bell anywhere? Is this a known WinNT "feature"? 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). I'm using DJGPP v2.03 with GCC v2.95.3, binaries about 6 months old. Tony -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net