RFR: 8339134: Callers of Exceptions::fthrow should ensure exception message lengths avoid the INT_MAX limits of os::vsnprintf [v2]

David Holmes dholmes at openjdk.org
Wed Nov 20 00:09:15 UTC 2024


On Tue, 19 Nov 2024 22:14:45 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Restore previous behaviour for zero length strings
>
> Okay, I understand the change now.  Looks good.

Thanks for the review @coleenp . I will re-merge and re-test then seek second review.

> src/hotspot/share/interpreter/linkResolver.cpp line 328:
> 
>> 326: 
>> 327:     // Names are all known to be < 64k so we know this formatted message is not excessively large.
>> 328: 
> 
> Can you move this comment to before the first fthrow call at 331?  The other fthrow has a msg so doesn't really apply and the comment looks better as just one line like the other places.

The comment still applies to the msg created by:

char* msg = Reflection::verify_class_access_msg(ref_klass,
                                                    InstanceKlass::cast(base_klass),
                                                    vca_result);

which is also known to be limited by class name symbol lengths. That is why I placed the comment prior to both fthrow calls.

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

PR Comment: https://git.openjdk.org/jdk/pull/21867#issuecomment-2487016585
PR Review Comment: https://git.openjdk.org/jdk/pull/21867#discussion_r1849319949


More information about the serviceability-dev mailing list