[aarch64-port-dev ] jdk8: random null pointer exceptions from javac

Edward Nevill edward.nevill at gmail.com
Thu Nov 5 10:56:39 UTC 2015


On Thu, 2015-11-05 at 09:25 +0000, Andrew Dinn wrote:
> On 04/11/15 17:18, Edward Nevill wrote:
> 
> 1. These changes apply to jdk8 (because the bug has been seen in jdk8).

Correct. I observe it in jdk8 because that is what I use to build jdk9.

> 2. You are changing the definition of the output allocation operand
> iRegNNoSP to use a register class which excludes rfp.

Correct.

> 3. This stops it being treated like iRegINoSp which allows integer
> outputs to be generated in rfp.

Correct.

> 4. It also puts iRegNNoSP on a par with iRegPNoSP which also uses a
> register class that excludes rfp.

Correct.

> 5. And the reason for doing this is that you think the GC fails to find
> oops when they are saved in rfp.

Correct.

> Is that correct? Is so then I am still unsure why this same problem does
> not arise on jdk9.

We do. I have just replicated it on jdk9, but only if I use -XX:+UseParallelGC, with the default G1GC it seems to work fine, as does jdk8 if you use -XX:+UseG1GC.

> The definition for iRegNNoSp in jdk9 uses a register class which
> conditionally includes rfp iff PreserveFramePointer is true. So, in jdk9
> narrow oops can be stored in rfp when PreserveFramePointer is true.

No. PreserveFramePointer means FP must be preserved as a genuine frame pointer and is therefore not available for register allocation.

> Why do we not see the same problem on jdk9?
> 
> Is there a disparity in the GC behaviour which means this works on jdk9?

Yes. Its a different GC. I only observe the problem with ParallelGC. This does not mean that the problem is not there with G1GG, it is a random, infrequent bug so it may be sitting there waiting with G1GC.

All the best,
Ed.




More information about the aarch64-port-dev mailing list