- changed title to ArrayIndexOutOfBoundsException when analyzing "broken" code
- edited description
ArrayIndexOutOfBoundsException when analyzing "broken" code
The following code ends with a "NOP" instruction... this is so broken...! However, the code is compile-time dead and, hence, we should be able detect and ignore it.
org.python.modules.SynchronizedCallable{ public org.python.core.PyObject call(org.python.core.PyObject){ Some(jar:file:/Users/eichberg/Desktop/QualitasCorpus-20130901r/Systems/c_jdbc/c_jdbc-2.0.2/src/c-jdbc-2.0.2-src/3rdparty/iSQL/lib/jpython1.1.jar!/org/python/modules/SynchronizedCallable.class) } } java.lang.ArrayIndexOutOfBoundsException: 37 at org.opalj.br.Code$$anonfun$predecessorPCs$1.apply$mcVI$sp(Code.scala:503) at org.opalj.br.Code$$anonfun$predecessorPCs$1.apply(Code.scala:499) at org.opalj.br.Code$$anonfun$predecessorPCs$1.apply(Code.scala:499)
PC Line Instruction Exceptions
0 42 aload_1
1 | arraylength
2 | ifne11
5 43 ldc "synchronized callable called with 0 args"
7 | invokestatic ..core.Py { ..core.PyException TypeError (java.lang.String) }
10 | athrow
11 45 aload_1
12 | iconst_0
13 | aaload
14 | invokestatic ...synchronize { java.lang.Object _getSync (..core.PyObject) }
17 | astore_3
18 | aload_3
19 | monitorenter
20 46 aload_0 1: Any
21 | getfield ...SynchronizedCallable { ..core.PyObject callable }
24 | aload_1
25 | aload_2
26 | invokevirtual ..core.PyObject { ..core.PyObject __call__ (..core.PyObject[], java.lang.String[]) }
29 | astore 5
31 | jsr 45
34 | aload 5
36 | areturn
37 | aload_3
38 | monitorexit
39 | goto 51
42 | aload_3
43 | monitorexit
44 | athrow
45 | astore 4
47 | aload_3
48 | monitorexit
49 | ret 4
51 | nop
Comments (5)
-
reporter -
reporter - edited description
-
reporter - changed status to resolved
fixed issue
#100- handling of totally broken compile-time dead codeSigned-off-by: Michael Eichberg mail@michael-eichberg.de
→ <<cset 8b551ae77958>>
-
reporter - removed milestone
Removing milestone: 0.9.0-M1 (automated comment)
-
reporter - removed version
Removing version: 0.9.0 (automated comment)
- Log in to comment