RFR: 8339190: Parameter arrays that are capped during annotation processing report incorrect length [v3]
Nizar Benalla
nbenalla at openjdk.org
Thu Oct 31 18:02:56 UTC 2024
> Can I please get a review for this change.
> Passes tier1, currently running tier 2-3.
>
> The regression test creates temporary files in `tmpdir` to check that the warning is emitted correctly.
> I've also added the new warning to `example.not-yet.txt` as the example would require a very large file.
>
> Here is the result of running `javap -c -p -v` on `ClassAnnotationWithLength_65536.class` and `ClassAnnotationWithLength_65537.class` respectively. Results are the same before/after the change.
>
>
> static int x;
> descriptor: I
> flags: (0x0008) ACC_STATIC
> RuntimeVisibleAnnotations:
> 0: #14(#15=s#16,#17=I#18,#19=[J#20])
> CustomAnno(
> value="custom"
> count=42
> arr=[-1l]
> )
>
>
>
> static int x;
> descriptor: I
> flags: (0x0008) ACC_STATIC
> RuntimeVisibleAnnotations:
> 0: #14(#15=s#16,#17=I#18,#19=[J#20,J#20])
> CustomAnno(
> value="custom"
> count=42
> arr=[-1l,-1l]
> )
>
>
> TIA
Nizar Benalla has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
- Update test
- revert changes to TypeAnnotations
generate error when param array is too large
generate error closer to other limits, during code gen
- Merge remote-tracking branch 'upstream/master' into 8339190-Parameter-arrays
- - remove unused import
- realized I need to change the condition in my for loop
- try to remove trailing whitespace
- simplify BufferedWriter creation
- JDK-8339190
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/21663/files
- new: https://git.openjdk.org/jdk/pull/21663/files/80d25a19..35b89ece
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=21663&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=21663&range=01-02
Stats: 23960 lines in 191 files changed: 4180 ins; 18863 del; 917 mod
Patch: https://git.openjdk.org/jdk/pull/21663.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21663/head:pull/21663
PR: https://git.openjdk.org/jdk/pull/21663
More information about the compiler-dev
mailing list