-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8347006: LoadRangeNode floats above array guard in arraycopy intrinsic #22967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
425bbb6
5c0292a
3b465a4
0a1fe38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| /* | ||
| * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. | ||
| * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. | ||
| * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| * | ||
| * This code is free software; you can redistribute it and/or modify it | ||
|
|
@@ -1473,16 +1473,17 @@ class TypeAryPtr : public TypeOopPtr { | |
| virtual const TypeKlassPtr* as_klass_type(bool try_for_exact = false) const; | ||
|
|
||
| // Convenience common pre-built types. | ||
| static const TypeAryPtr *RANGE; | ||
| static const TypeAryPtr *OOPS; | ||
| static const TypeAryPtr *NARROWOOPS; | ||
| static const TypeAryPtr *BYTES; | ||
| static const TypeAryPtr *SHORTS; | ||
| static const TypeAryPtr *CHARS; | ||
| static const TypeAryPtr *INTS; | ||
| static const TypeAryPtr *LONGS; | ||
| static const TypeAryPtr *FLOATS; | ||
| static const TypeAryPtr *DOUBLES; | ||
| static const TypeAryPtr* BOTTOM; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While you are here it may be better to change the other constant to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, done. |
||
| static const TypeAryPtr* RANGE; | ||
| static const TypeAryPtr* OOPS; | ||
| static const TypeAryPtr* NARROWOOPS; | ||
| static const TypeAryPtr* BYTES; | ||
| static const TypeAryPtr* SHORTS; | ||
| static const TypeAryPtr* CHARS; | ||
| static const TypeAryPtr* INTS; | ||
| static const TypeAryPtr* LONGS; | ||
| static const TypeAryPtr* FLOATS; | ||
| static const TypeAryPtr* DOUBLES; | ||
| // selects one of the above: | ||
| static const TypeAryPtr *get_array_body_type(BasicType elem) { | ||
| assert((uint)elem <= T_CONFLICT && _array_body_type[elem] != nullptr, "bad elem type"); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| /* | ||
| * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. | ||
| * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. | ||
| * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| * | ||
| * This code is free software; you can redistribute it and/or modify it | ||
|
|
@@ -23,11 +23,14 @@ | |
|
|
||
| /* | ||
| * @test | ||
| * @bug 8064703 | ||
| * @bug 8064703 8347006 | ||
| * @summary Deoptimization between array allocation and arraycopy may result in non initialized array | ||
| * | ||
| * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:TypeProfileLevel=020 | ||
| * compiler.arraycopy.TestArrayCopyNoInit | ||
| * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:TypeProfileLevel=020 | ||
| * -XX:+UnlockExperimentalVMOptions -XX:+UseCompactObjectHeaders -XX:-UseTLAB | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have been able to reproduce this with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
No, I was never able to reproduce this with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, I was confused by this in PR body then:
But fine, if it reproduces with +UCOH, let it be there. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, that's actually a typo, good catch. Should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cant you please add this '@run' as a separate testcase with it's own id. So it is easier to identify and exclude the failures. |
||
| * compiler.arraycopy.TestArrayCopyNoInit | ||
| */ | ||
|
|
||
| package compiler.arraycopy; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do this for above code when layout is known for compiler (
layout_conis checked)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about this as well but I don't think it's necessary because:
So I went with the simplest changes for now, also since we need to backport this change (it got already much more complicated than I was aiming for).