Opened 6 years ago
Last modified 6 years ago
#95 accepted defect
sim: Integers < -5 appearing in dbg.value are discarded.
| Reported by: | Lukáš Zaoral | Owned by: | mornfall |
|---|---|---|---|
| Priority: | major | Milestone: | 4.4 |
| Component: | sim | Keywords: | |
| Cc: | kdudka@…, jamartis@…, lzaoral@… |
Description
Hello,
if I run the following code in the divine sim (occurs also on next builds):
int main(void)
{
int a = -1;
int b = -5;
return 0;
}
the show command outputs:
> show
attributes:
address: heap* 1f78a5dd 0+0
size: 16
pc: code* 80001 0
location: test3.c:5
symbol: main
.a:
type: int
value: [i32 4294967295 d]
scope: main
related: [ caller ]
# executing main at test3.c:5
where the b variable entry is missing. Thanks!
Change History (1)
comment:1 Changed 6 years ago by
| Status: | new → accepted |
|---|---|
| Summary: | sim: Negative integer is ignored when defined after another negative integer. → sim: Integers < -5 appearing in dbg.value are discarded. |
Note: See
TracTickets for help on using
tickets.
Some data points: this works if the variables are used (e.g. put a printf after the declarations) or
--disable-static-reductionis given. The only real problem seems to be withdbg.value(which is what remains after theallocais removed) and values less than -4 (changingbto -2 fixes the problem too).