Skip to content

Commit 23aaf82

Browse files
author
pkesseli
committed
- Fixed vtables in Java.
- Removed UB in Java bytecode module. - Recompiled virtual1-virtual4 with JDK 8.
1 parent 5586409 commit 23aaf82

File tree

17 files changed

+79
-86
lines changed

17 files changed

+79
-86
lines changed
-7 Bytes
Binary file not shown.
254 Bytes
Binary file not shown.
-266 Bytes
Binary file not shown.

regression/cbmc-java/virtual1/virtual1.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class virtual1
1616
public static void main(String[] args)
1717
{
1818
A a=new A();
19+
B b=new B();
1920
a.f();
2021
}
2122
}
17 Bytes
Binary file not shown.

regression/cbmc-java/virtual2/virtual2.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ class virtual2
1515
{
1616
public static void main(String[] args)
1717
{
18-
A a=new B();
19-
a.f();
18+
A a=new A();
19+
A b=new B();
20+
b.f();
2021
}
2122
}
2223

235 Bytes
Binary file not shown.
24 Bytes
Binary file not shown.
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
interface A
22
{
33
public void f();
4-
};
4+
}
55

66
class B implements A
77
{
88
public void f()
99
{
1010
assert false;
1111
}
12-
};
12+
}
13+
14+
class C implements A
15+
{
16+
public void f(){}
17+
}
1318

1419
class virtual3
1520
{
1621
public static void main(String[] args)
1722
{
18-
A a = new B();
19-
a.f();
23+
A b = new B();
24+
A c = new C();
25+
b.f();
2026
}
2127
}
2228

24 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)