RFR(T) : 8195060 : vm/mlvm/anonloader/stress/byteMutation intermittently times out
Vladimir Kozlov
vladimir.kozlov at oracle.com
Wed Feb 13 17:57:09 UTC 2019
So the test filters out invalid class file before executing? Good then.
Thanks,
Vladimir
On 2/13/19 9:35 AM, Igor Ignatyev wrote:
> in its current state, the test changes 4 random bytes to random values, and w/ <clinit> being[1] I don't see it possible to get valid classfile w/ an infinite recursion in <clinit>.
>
> Thanks,
> -- Igor
>
> [1]
>> static {};
>> descriptor: ()V
>> flags: (0x0008) ACC_STATIC
>> Code:
>> stack=6, locals=0, args_size=0
>> 0: ldc #8 // String %65500c%X
>> 2: iconst_2
>> 3: anewarray #9 // class java/lang/Object
>> 6: dup
>> 7: iconst_0
>> 8: bipush 99
>> 10: invokestatic #10 // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
>> 13: aastore
>> 14: dup
>> 15: iconst_1
>> 16: invokestatic #11 // Method vm/mlvm/share/Env.getRNG:()Ljava/util/Random;
>> 19: invokevirtual #12 // Method java/util/Random.nextLong:()J
>> 22: invokestatic #13 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
>> 25: aastore
>> 26: invokestatic #14 // Method java/lang/String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
>> 29: putstatic #2 // Field theDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrumIsTheDrum:Ljava/lang/String;
>> 32: return
>> LineNumberTable:
>> line 31: 0
>> line 32: 10
>> line 31: 32
>
>> On Feb 13, 2019, at 9:28 AM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>>
>> Can it randomly generate infinite recursions in <clinit> method too so your fix would be not enough? Or only <init>?
>>
>> Thanks,
>> Vladimir
>>
>> On 2/12/19 7:20 PM, Igor Ignatyev wrote:
>>> http://cr.openjdk.java.net/~iignatyev/8195060/webrev.00/
>>>> 2 lines changed: 0 ins; 0 del; 2 mod;
>>> Hi all,
>>> could you please review this one-line patch for vmTestbase/vm/mlvm/anonloader/stress/ tests? the goal of these tests is to check that loading of anonymous classes won't lead to a crash and/or a hang, byteMutation test uses a randomly changed class file, which in some cases might lead to infinite recursions in <init> method. as the tests don't need to create an instance of loaded anonymous class to achieve their goal, the patch replaces Class::newInstance call w/ Unsafe::ensureClassInitialized to guarantee that we try to load, link and initialize classes.
>>> webrev: http://cr.openjdk.java.net/~iignatyev/8195060/webrev.00/
>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8195060
>>> testing:
>>> - vmTestbase/vm/mlvm/anonloader/stress/ tests
>>> - manually verified that the tests still can fail by running w/ Xverify:none
>>> Thanks,
>>> -- Igor
>
More information about the hotspot-compiler-dev
mailing list