Skip to content

Commit b867580

Browse files
author
Daniel Kroening
authored
Merge pull request #212 from smowton/java_clsid_fix
Java clsid fix
2 parents 96156fe + a7f948a commit b867580

File tree

6 files changed

+31
-1
lines changed

6 files changed

+31
-1
lines changed
229 Bytes
Binary file not shown.
240 Bytes
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CORE
2+
virtual5.class
3+
--function virtual5.test
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
574 Bytes
Binary file not shown.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
public class virtual5 {
2+
3+
public static void test(parent p, child c) {
4+
5+
if(p==null)
6+
return;
7+
assert(p.get()==1);
8+
9+
}
10+
11+
}
12+
13+
class parent {
14+
15+
public int get() { return 1; }
16+
17+
}
18+
19+
class child extends parent {
20+
21+
public int get() { return 2; }
22+
23+
}

src/java_bytecode/java_object_factory.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ void gen_nondet_init(
111111

112112
if(name=="@class_identifier")
113113
{
114-
constant_exprt ci(class_identifier, string_typet());
114+
irep_idt qualified_clsid="java::"+as_string(class_identifier);
115+
constant_exprt ci(qualified_clsid,string_typet());
115116

116117
code_assignt code(me, ci);
117118
init_code.copy_to_operands(code);

0 commit comments

Comments
 (0)