RFR: JDK-8293978: Duplicate simple loop back-edge will crash the vm [v3]
王超
duke at openjdk.org
Tue Sep 20 01:22:52 UTC 2022
On Mon, 19 Sep 2022 12:29:38 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> 王超 has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>>
>> Move the condition ahead
>
> test/hotspot/jtreg/compiler/c2/TestDuplicateSimpleLoopBackedge.java line 37:
>
>> 35:
>> 36: class Foo {
>> 37: static void c(Byte[] a, Byte d) {
>
> Method can be moved to `TestDuplicateSimpleLoopBackedge`.
done
> test/hotspot/jtreg/compiler/c2/TestDuplicateSimpleLoopBackedge.java line 43:
>
>> 41: }
>> 42:
>> 43: public class TestDuplicateSimpleLoopBackedge {
>
> There are a lot of unused variables which could probably be removed and it would still trigger the crash. Also, I recommend to give methods a name different from single letters even though it's just a test.
done
> test/hotspot/jtreg/compiler/c2/TestDuplicateSimpleLoopBackedge.java line 74:
>
>> 72: thread.start();
>> 73: Thread.sleep(Utils.adjustTimeout(4000));
>> 74: }
>
> Can be simplified to just:
>
>
> TestDuplicateSimpleLoopBackedge n = new TestDuplicateSimpleLoopBackedge();
> for (int i = 0; i < 10000; ++i) {
> n.j(args);
> }
>
> and then you can run the test with `-Xbatch` which disabled background compilation and waits until the compilation is complete.
done
-------------
PR: https://git.openjdk.org/jdk/pull/10329
More information about the hotspot-compiler-dev
mailing list