RFR: 8263676: AArch64: one potential bug in C1 LIRGenerator::generate_address()

Fei Yang fyang at openjdk.java.net
Thu Mar 18 02:20:49 UTC 2021


On Wed, 17 Mar 2021 14:37:28 GMT, Andrew Haley <aph at openjdk.org> wrote:

>>> Hmm. Do you suppose that perhaps the bug could be provoked actually to fire with a contrived test case? I guess a huge Object wouldn't be enough, because there already huge Object tests in jtreg.
>> 
>> I'm not sure you understood what I was saying. This is a contingency in the current implementation of C1, not an execution flow contingency dependent on present use cases. Nothing is going to exercise this without a code change in the C1 code because disp is always passed as a specific well known, small constant like the array header length offset or the offset of Java instance field ByteBuffer.length. 
>> 
>> My concern here is that such a code change could be waiting to pounce around the next corner.
>
>> > Hmm. Do you suppose that perhaps the bug could be provoked actually to fire with a contrived test case? I guess a huge Object wouldn't be enough, because there already huge Object tests in jtreg.
>> 
>> I'm not sure you understood what I was saying. This is a contingency in the current implementation of C1, not an execution flow contingency dependent on present use cases. Nothing is going to exercise this without a code change in the C1 code because disp is always passed as a specific well known, small constant like the array header length offset or the offset of Java instance field ByteBuffer.length.
> 
> Ah. I read your quoted code and it appeared to be a field offset.
>> 
>> My concern here is that such a code change could be waiting to pounce around the next corner.
> 
> Sure. OK, but never-executed code will always give me shivers.

Thanks for taking a further step to find it out.  Based on the discussion, let's get this in.  So that people won't get confused when they are looking at this part.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3040


More information about the hotspot-compiler-dev mailing list