Skip to content

Commit 5a775c1

Browse files
committed
Fix consistency error in SSA level 1 renaming
a5bc493 introduced cases where information in the frame may become inconsistent with the actual renaming being used, as shown in the regression test.
1 parent 639974d commit 5a775c1

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
inline void foo(int x)
2+
{
3+
}
4+
5+
void bar()
6+
{
7+
foo(0);
8+
}
9+
10+
void foobar()
11+
{
12+
// different argument values must not cause an inconsistency in the
13+
// equation system
14+
foo(0);
15+
bar();
16+
foo(1);
17+
}
18+
19+
int main()
20+
{
21+
foobar();
22+
foobar();
23+
__CPROVER_assert(0, "");
24+
return 0;
25+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED$
7+
--
8+
^warning: ignoring

src/goto-symex/symex_function_call.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,9 +501,9 @@ void goto_symext::locality(
501501
while(state.l1_history.find(l1_name)!=state.l1_history.end())
502502
{
503503
state.level1.increase_counter(l0_name);
504+
++offset;
504505
ssa.set_level_1(frame_nr+offset);
505506
l1_name=ssa.get_identifier();
506-
++offset;
507507
}
508508

509509
// now unique -- store

0 commit comments

Comments
 (0)