Skip to content

Commit

Permalink
- Avoid stack overflow in all CORBA calls
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10512 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 15, 2011
1 parent 0bda135 commit 8b16531
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Compiler/Main/Main.mo
Expand Up @@ -265,6 +265,12 @@ algorithm
str = stringAppend(str, Error.printMessagesStr());
then
(true,str,isymb);
case (str,isymb)
equation
_=System.setStackOverflowSignal(false);
Error.addMessage(Error.STACK_OVERFLOW,{str});
then
(true,"",isymb);
end matchcontinue;
end handleCommand;

Expand Down
1 change: 1 addition & 0 deletions Compiler/Util/Error.mo
Expand Up @@ -551,6 +551,7 @@ public constant Message UNFILLED_SLOT = MESSAGE(203, TRANSLATION(), ERROR(),
"Function argument %s was not given by the function call, and does not have a default value.");
public constant Message SAME_CONNECT_INSTANCE = MESSAGE(204, TRANSLATION(), WARNING(),
"connect(%s, %s) connects the same connector instance! The connect equation will be ignored.");
public constant Message STACK_OVERFLOW = MESSAGE(205, SCRIPTING(), ERROR(), "Stack overflow occurred while evaluating %s");

public constant Message UNBOUND_PARAMETER_WITH_START_VALUE_WARNING = MESSAGE(499, TRANSLATION(), WARNING(),
"Parameter %s has no value, and is fixed during initialization (fixed=true), using available start value (start=%s) as default value");
Expand Down

0 comments on commit 8b16531

Please sign in to comment.