RFR: 8338888: SystemDictionary::class_name_symbol has incorrect length check [v2]

Thomas Stuefe stuefe at openjdk.org
Wed Aug 28 07:25:19 UTC 2024


On Wed, 28 Aug 2024 06:02:40 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> You're right. I can apply the "abridged" pattern here as done in `java_lang_String::print` using the `MaxStringPrintSize` global. But this is now encroaching on the remedial actions I planned to undertake for [JDK-8328882](https://bugs.openjdk.org/browse/JDK-8328882).  I only need this change in this PR to handle the test case for the actual bug fix (otherwise I have to drop the part of the test that verifies it is the expected error message).
>> 
>> I will look at creating a sub-task of JDK-8328882 to handle callers of `Exceptions::fthrow` and fix this issue under that task first.
>
> Well I created a sub-task as I indicated and it turned out that most places are safe but can still have "names" up to 64K, but the nature of the error messages are such that they are not really amenable to abridged versions, plus you may need the full name to actually see the error. So in that regard I think `fthrow` is actually wrong to impose its own 1K limit as it will prevent you from debugging things - in some cases long before you get anywhere near excessive individual names.
> 
> But back to the individual case at hand ... given we know its a giant name and its going to get truncated anyway, then the abridged version is better IMO as I still contend that given it is an erroneous condition it is most likely the error occurred at the start or end (I've absolutely no data to back that up : ) ).

I think most people will be helped even with the abridged error messages. Better than having no error text at all.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20709#discussion_r1734130061


More information about the hotspot-runtime-dev mailing list