Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8361886

Make csize_t an unsigned int

XMLWordPrintable

      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.

            mhaessig Manuel Hässig
            mhaessig Manuel Hässig
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: