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 , 11 years ago
comment:2 by , 11 years ago
I guess you mean nremTAout:
It should be set to zero due to the specification [section 11.1.2]:
An algorithm section is conceptually a code fragment that remains together and the statements of an algorithm section are executed in the order of appearance. Whenever an algorithm section is invoked, all variables appearing on the left hand side of the assignment operator ":=" are initialized (at least conceptually):
- 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).
comment:5 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:6 by , 11 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
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:8 by , 10 years ago
Milestone: | 1.9.1 → 1.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 , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:14 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:15 by , 7 years ago
Milestone: | 1.12.0 → 1.13.0 |
---|---|
Resolution: | → worksforme |
Status: | reopened → closed |
As of v1.13.0-dev-188-g2c5818d the model in comment:6 works correctly
Shouldn't it throw a segmentation fault though? It never resets remTAout to 0.