From: SourceForge.net <no...@so...> - 2003-01-27 17:47:48
|
Bugs item #613998, was opened at 2002-09-24 12:21 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=613998&group_id=599 Category: C-Front End Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jesus Calvino-Fraga (jesusc) Assigned to: Johan Knol (johanknol) Summary: Crash or bad code in Win98. Ok in WinXP. Initial Comment: When compiling the file 'parse.c' (sdcc -c parse.c) sdcc crashes or generates bad code on Windows 95/98 but works ok in Windows 2k/XP. Adding or removing random code in 'parse.c' will cause sdcc to crash, generate wrong code, or even generate correct code under Windows 95/98. When line 'char j=0;' is commented out in 'parse.c' sdcc was crashing in my Windows 98 machine, but it may just generate bad code in Windows 95. I am using the latest CVS sources compiled with Visual C++ 6.0. I used the same executable when testing on the four machines. It doesn't matter if I build sdcc on any of the four machines the result is the same. When sdcc crashes it points to either sdcc\src\SDCCloop.c:214 or sdcc\src\SDCCloop.c:216: int findLoopEndSeq (region * lreg) { eBBlock *block; eBBlock *lblock; for (block = lblock = setFirstItem (lreg->regBlocks); block; block = setNextItem (lreg->regBlocks)) { if (block != lblock && block->lSeq > lblock->lSeq) <-- CRASHES HERE lblock = block; } return lblock->lSeq <-- OR CRASHES HERE } And the problem is that either block or lblock are invalid, for example lblock=0x00000194. I am also including the asm listing when compiling in Windows 98 and Windows XP, in one of the many occasions where the generated code was different. If I change the code in SDCCloop.c so that it checks for block and lblock to be larger than (eBBlock *)0x1000 sdcc doesn't crash but it generates bad code. ---------------------------------------------------------------------- >Comment By: Jesus Calvino-Fraga (jesusc) Date: 2003-01-27 09:52 Message: Logged In: YES user_id=603650 Yes, it still exists. The debugger breaks at SDCCloop.c:218. ---------------------------------------------------------------------- Comment By: Johan Knol (johanknol) Date: 2003-01-27 01:47 Message: Logged In: YES user_id=63512 Can you confirm this still exists in latest cvs? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=613998&group_id=599 |