JDK-8361886 : Make csize_t an unsigned int
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 26
  • Priority: P5
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-07-10
  • Updated: 2025-11-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Blocks :  
Relates :  
Description
The class CodeBuffer typedefs csize_t as int. However, since this type represents code size, this really should be an unsigned type. As the comment next to the typedef states "code size type; would be size_t except for history", but we do not want it to be size_t since a 32-bit size is large enough for a code buffer and size_t would unnecessarily increase the memory footprint.
Some newer uses of csize_t have negative values. These types need to be changed to an appropriate type like ptrdiff_t or int.