RFR: 8267773: PhaseStringOpts::int_stringSize doesn't handle min_jint correctly
Aleksey Shipilev
shade at openjdk.java.net
Mon May 31 07:50:18 UTC 2021
On Fri, 28 May 2021 20:56:54 GMT, Nils Eliasson <neliasso at openjdk.org> wrote:
> Hi,
>
> PhaseStringOpts::int_stringSize doesn't handle min_jint correctly - it can't be negated to a positive number. I fix this adding a special case for this.
>
> Added a test that was contributed by Adam who reported the bug. Will add as a contributor.
>
> Please review,
> Best regards,
> Nils Eliasson
Huh, I found a similar issue with fuzzer tests this weekend. I minimized this to string concat bug as well, here is the test that I have: https://cr.openjdk.java.net/~shade/scratch/8267773.patch -- feel free to merge it here.
test/hotspot/jtreg/compiler/stringopts/TestFetchStaticField.java line 37:
> 35: import jdk.test.lib.Asserts;
> 36:
> 37: public class TestFetchStaticField {
Why `TestFetchStaticField`? Is this really specific to static fields?
test/hotspot/jtreg/compiler/stringopts/TestFetchStaticField.java line 48:
> 46:
> 47: public static void main(String[] argv)
> 48: {
Inconsistent bracing style, should be on the same line?
-------------
PR: https://git.openjdk.java.net/jdk/pull/4255
More information about the hotspot-compiler-dev
mailing list