RFR: 8338257: UTF8 lengths should be size_t not int [v7]

Thomas Stuefe stuefe at openjdk.org
Thu Aug 29 05:56:23 UTC 2024


On Thu, 29 Aug 2024 05:52:26 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Many of these translations seem awkward, since they convert to size_t only to then convert back to int.
> 
> Proposal: I undestand you need to find a good point to tourniquet off the int->size_t conversion to minimize the translations needed. But I'd consider converting SymbolTable functions to size_t too. SymbolTable already does not use the full width of the int length parameter, so functionally nothing changes (it needs to check the length for validity).
> 
> If you worry that the changes fan out too much, at least consider converting SymbolTable::new_symbol. That appears about ten times.

If you want to leave it as it is, that is fine, in that case I'll review the existing patch.

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

PR Comment: https://git.openjdk.org/jdk/pull/20560#issuecomment-2316769341


More information about the serviceability-dev mailing list