RFR(M) 8058744: Crash in C1 OSRed method w/ Unsafe usage
igor.veresov at oracle.com
Tue Sep 23 19:28:54 UTC 2014
I’ve updated the test to use the test library.
On Sep 23, 2014, at 1:18 AM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
> If you haven't pushed it yet, I have a couple of comments about the test:
> * no need to implement getUnsafe(): it is already present in test/testlibrary/com/oracle/java/testlibrary/Utils.java. You can reuse it (@library /testlibrary) or place the test on bootclasspath (main/bootclasspath) to make Unsafe.getUnsafe() work out-of-box.
> * add ability to make random generator predictable;
> 8044186 introduce all necessary functionality. Since it hasn't been integrated yet, the test can be updated there.
> Best regards,
> Vladimir Ivanov
> On 9/23/14, 1:19 AM, Igor Veresov wrote:
>> Vladimir, Dave,
>> Thanks for the reviews. I’ve added tests for multiplication of the index. And extended the comment that Vladimir suggested.
>> Webrev: http://cr.openjdk.java.net/~iveresov/8058744/webrev.01/
>> On Sep 22, 2014, at 12:27 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>>> Can you extend next comment explaining why you need such difference?:
>>> // Index is a long register or a int constant
>>> Otherwise changes are good.
>>> On 9/19/14 8:22 PM, Igor Veresov wrote:
>>>> C1 tries to pattern-match argument computation for UnsafeRawOp nodes in order to fold it into an address expression. The original problem is that it had a bug that made it match any shift, instead of only a left shift. But many aspects of this optimization was not entirely correct for 64-bit. It had a bunch of point-fixes in the LIR emitter, but I found a bunch of other problems. I also refactored it a bit, to make it more easier to reason about.
>>>> Webrev: http://cr.openjdk.java.net/~iveresov/8058744/webrev.00/
>>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8058744
More information about the hotspot-compiler-dev