[OpenSTA-devel] [ opensta-Bugs-1240930 ] Compiler crashes when bad var SET to array var that isn't
Brought to you by:
dansut
|
From: SourceForge.net <no...@so...> - 2007-07-17 21:13:54
|
Bugs item #1240930, was opened at 2005-07-19 11:41 Message generated for change (Comment added) made by dansut You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110857&aid=1240930&group_id=10857 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Script Language Group: Crash Status: Open >Resolution: Fixed Priority: 5 Private: No Submitted By: Daniel Sutcliffe (dansut) Assigned to: Daniel Sutcliffe (dansut) Summary: Compiler crashes when bad var SET to array var that isn't Initial Comment: This SCL script illustrates the problem: Environment Description "This causes the compiler to crash" Definitions CHARACTER ChrNotArray Code SET NotVar = ChrNotArray[1] Exit It should produce a compliation error because NotVar doesn't exist and and ChrNotArray is not an array - but it actually crashes the compiler. If ChrNotArray is an INTEGER the compiler doesn't crash and produces the correct error message. ---------------------------------------------------------------------- >Comment By: Daniel Sutcliffe (dansut) Date: 2007-07-17 17:10 Message: Logged In: YES user_id=19748 Originator: YES A fix for this issue has been merged into the CVS HEAD. It will become generally available in the OpenSTA 1.4.4 release. scl.exe: 1.4.4.3 OpenSTA: 1.4.4.10 This problem was not exactly as originally reported, it was a little more widespread. You 'simply' had to use an array indexed var that wasn't an array or the same type as the destination of the SET. Undefined variables on the left side of the set are assumed to be integers for the purpose of further parsing. All these caused the compiler to crash: SET ChrVar = IntNotArray[1] SET ChrConst = IntNotArray[1] SET IntVar = ChrNotArray[1] SET IntConst = ChrNotArray[1] SET NotVar = ChrNotArray[1] etc. Fixed the parser to assume the rest of the command was garbage when it hit an array index that didn't belong - something in the parsing after that point was getting messed up and it was easiest to just do no more parsing. As a bonus along with this fix I removed the rubbish index information from the SET VARIABLE trace message output in the Modeler when running a script. ;) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110857&aid=1240930&group_id=10857 |