RFR: 8310929: Optimization for Integer.toString [v12]
Chen Liang
liach at openjdk.org
Tue Jul 18 01:58:13 UTC 2023
On Tue, 18 Jul 2023 01:52:35 GMT, 温绍锦 <duke at openjdk.org> wrote:
>> I think he means to check the `charPos` to ensure it is not out of bounds.
>
> Oh, I see, charPos needs to do bound checks, I added assert with reference to the implementation of StringUTF16#putChar, is this safe enough?
I think we might need to look into the code around to ensure user input cannot cause charPos to go out of bounds. If charPos is not touched by user code at all, I think assert suffices (which are enabled via -esa and is thus enabled in the jtreg test suite)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14699#discussion_r1266092100
More information about the core-libs-dev
mailing list