RFR: 8339192: Native annotation parsing code of deprecated annotations causes crash [v2]
David Holmes
dholmes at openjdk.org
Tue Sep 17 22:10:05 UTC 2024
On Tue, 17 Sep 2024 08:48:18 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> For `@Deprecated` it previously asserted if there were <= 2 members and we needed to remove that. By examining only the first two members we are implicitly allowing for there to be more, but we will ignore all members if the unexpected ones come first. For `@Contended` we simply ignore the "value" setting if there is more than one member. I guess I could check for `count >= 1` to allow the same level of leniency.
>
> I meant > 2 of course.
But again the intent here is not to allow fabricated annotations to be treated like the real ones, but just to ensure such fabricated annotations don't cause a crash, or other failure. So I will keep the count check for exactly 1.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21030#discussion_r1764080572
More information about the hotspot-runtime-dev
mailing list