5 Trying to debug this issue, but it seems this value of 1 is being passed as an
6 argument call value, which is causing bad memory to be read.
10 So load pool is loading index 30, which seems to be at bad memory. So maybe the
11 constant pool register was trashed? or was not valid?
13 `***** @4f103158 LOAD_POOL /INVOKEVIRT | L135 /J26`.
14 ` A:[ 30, 22] | V:[ +0, +1060460]`.
18 Oh, so there is a load pool which reads a value of 28.
22 So after `jvmIsInstance()` I see register 15 is `1` and it tries to do an
23 atomic increment and such on it. `INSTANCEOF` before that call after the
24 instance stuff copies 1 into register 15. So I wonder if that is wrong
25 because the 1 is from the return value. The check is doing if r9 is an
26 instance of r21 which is true. So I think the instanceof check is off.
30 I think it might be a transition issue from a branch?
34 Okay the instructions do not seem to add up? At `String.equals()`
35 `IFNE | L131 /J11` if they are not equals they jump to another address and
36 I have a thought right now about it. In the byte code it says to jump to
37 J16 but in the code set it ends up being J17. J16 is `aload_1` which means
38 that the original value is not being read because it ends up getting
39 cached by the stack cacher when it should be invalid.
43 Okay so whatever is on the stack, is cached from register 9 (local 1). So
44 that is fine. Checkcast has a cached input (virtual 15 as register 9), then
49 Okay so, instanceof drops its value into register 15. Then IFNE is done on
50 that r15, which sould then invalidate its value on the stack. Then check cast
51 would be done on the virtual 14 which is local 2 (9). So that value is
52 completely eaten. Then astore_2 of r15 is done (into r10).
56 So I am pretty sure my stack transitioning code is wrong because this value in
61 Okay before I go more into debugging, I am going to write an actual utility
62 which through the build engine can print the byte code and native code side by
63 side with actual source lines too!
67 So now I have source printing, but I should add a line population count so I
68 can sort of tell the difference between them.
72 Now that I have this utility perhaps debugging this will be easier.
76 Okay so, I think CHECKCAST is having troubles. Pretty sure it is in this
77 instruction. Because CHECKCAST reads a value in, then writes a value out that
78 is the same result. But my code smartly does not do this copy of a value. So
79 maybe the caching is incorrect?
83 Okay, so I corrected CHECKCAST by adding a new stack type, hopefully it does