Skip to content

Commit 6987879

Browse files
+ passing test checking NULL object dereferencing in Java
1 parent bb6dfa0 commit 6987879

File tree

5 files changed

+24
-0
lines changed

5 files changed

+24
-0
lines changed
207 Bytes
Binary file not shown.
277 Bytes
Binary file not shown.
Binary file not shown.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class A {
2+
int val;
3+
}
4+
5+
class B {
6+
int getVal(A a) {
7+
return a.val;
8+
}
9+
}
10+
11+
class pointer_check1 {
12+
public static void main(String[] args) {
13+
B b = new B();
14+
int myval = b.getVal(null);
15+
}
16+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
pointer_check1.class
3+
--pointer-check
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED$
7+
--
8+
^warning: ignoring

0 commit comments

Comments
 (0)