Skip to content

Commit

Permalink
- fixed a stack overflow in HPCOM
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus Walther committed Aug 10, 2015
1 parent 9819b58 commit ec27dd8
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Compiler/BackEnd/HpcOmTaskGraph.mo
Expand Up @@ -6267,14 +6267,21 @@ algorithm
local
Integer offset,eqSys,node;
Boolean eqSysNeq;
case(_,_,_,_)
equation
((node,eqSys,offset)) = arrayGet(varCompMapping,tryThisIndex);
eqSysNeq = intNe(eqSys,eqSysIdx);
node = if eqSysNeq then getNodeForVarIdx(varIdx,eqSysIdx,varCompMapping,tryThisIndex+offset) else node;
then node;
case(-1,-1,_,_)
then -1;
case(_,_,_,_)
equation
((node,eqSys,offset)) = arrayGet(varCompMapping,tryThisIndex);
eqSysNeq = intNe(eqSys,eqSysIdx);
if(intEq(offset, 0)) then
offset = 1;
end if;
node = if eqSysNeq then getNodeForVarIdx(varIdx,eqSysIdx,varCompMapping,tryThisIndex+offset) else node;
then node;
case(-1,-1,_,_)
then -1;
else
equation
print("HpcOmTaskGraph.getNodeForVarIdx failed\n");
then -1;
end matchcontinue;
end getNodeForVarIdx;

Expand Down

0 comments on commit ec27dd8

Please sign in to comment.