Commit d2d3142
committed
Contracts/DFCC: do not access invalidated references
In a sequence of `if` statements an earlier condition evaluated to true,
the body updated the irep a reference into which was held, making the
reference invalid when evaluating the next condition. This resulted in
intermittent segmentation faults.
Use `if`/`else if` instead to avoid evaluating later conditions.1 parent 91ea53f commit d2d3142
File tree
2 files changed
+2
-4
lines changed- src/goto-instrument/contracts/dynamic-frames
2 files changed
+2
-4
lines changedLines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
458 | | - | |
| 457 | + | |
459 | 458 | | |
460 | 459 | | |
461 | 460 | | |
| |||
0 commit comments