Opened 11 years ago

Closed 7 years ago

#2301 closed defect (worksforme)

simulation crashed

Reported by: Lennart Ochel Owned by: probably noone
Priority: high Milestone: 1.13.0
Component: Backend Version: trunk
Keywords: Cc:

Description

The following model throws a segmentation fault:

model dd
  parameter Integer N = 1;
  Integer nremTAout;
  Integer[N] remTAout;
algorithm
  for i in 1:N loop
    nremTAout := 1 + nremTAout;
    remTAout[nremTAout] := i;
  end for;
end dd;

Change History (15)

comment:1 by Martin Sjölund, 11 years ago

Shouldn't it throw a segmentation fault though? It never resets remTAout to 0.

comment:2 by Lennart Ochel, 11 years ago

I guess you mean nremTAout:
It should be set to zero due to the specification [section 11.1.2]:

  • A non-discrete variable is initialized with its start value (i.e. the value of the start-attribute).
  • A discrete variable v is initialized with pre(v).
Version 0, edited 11 years ago by Lennart Ochel (next)

comment:3 by Martin Sjölund, 11 years ago

All integers are discrete.

comment:4 by Lennart Ochel, 11 years ago

Well, that is of course true ...

comment:5 by Lennart Ochel, 11 years ago

Resolution: invalid
Status: newclosed

comment:6 by Lennart Ochel, 11 years ago

Resolution: invalid
Status: closedreopened

The following model throws a segmentation fault:

model dd
  parameter Integer N = 1;
  Integer nremTAout;
  Integer[N] remTAout;
algorithm
  nremTAout := 0;
  for i in 1:N loop
    nremTAout := 1 + nremTAout;
    remTAout[nremTAout] := i;
  end for;
end dd;

comment:7 by Martin Sjölund, 11 years ago

Milestone: 1.9.01.9.1

Postponed until 1.9.1

comment:8 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

comment:9 by Martin Sjölund, 10 years ago

Milestone: 1.9.21.9.3

Milestone changed to 1.9.3 since 1.9.2 was released.

comment:10 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:11 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

comment:12 by Martin Sjölund, 9 years ago

Milestone: 1.9.51.10.0

Milestone renamed

comment:13 by Martin Sjölund, 8 years ago

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

comment:14 by Martin Sjölund, 8 years ago

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:15 by Francesco Casella, 7 years ago

Milestone: 1.12.01.13.0
Resolution: worksforme
Status: reopenedclosed

As of v1.13.0-dev-188-g2c5818d the model in comment:6 works correctly

Note: See TracTickets for help on using tickets.