Opened 8 years ago

#4057 new defect

Cyclic parameter bindings with more than two elements lead to stack overflow in the Frontend

Reported by: Patrick Täuber Owned by: somebody
Priority: high Milestone: Future
Component: Frontend Version:
Keywords: parameter Cc:

Description

The following model leads to a stack overflow in Inst.updateComponentInEnv:

model parameterBug1
  parameter Boolean b1 = true;
  parameter Integer p1 = p2;
  parameter Integer p2 = if b1 then p3 else 0; // p2 = p3
  parameter Integer p3 = if b1 then 0 else p1; // p3 = 0
equation
end parameterBug1;

The following works fine:

model parameterBug1
  parameter Boolean b1 = true;
  parameter Integer p1 = if b1 then p2 else 0; // p1 = p2
  parameter Integer p2 = if b1 then 0 else p1; // p2 = 0
equation
end parameterBug1;

Change History (0)

Note: See TracTickets for help on using tickets.