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

ceil_log2 should not loop endlessly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • None
    • hotspot
    • b25

      ceil_log2 loops endlessly if the input value has the highest bit set. Either assert or return an error.

      About returning an error, return type should be int. (see also log2). Then, -1 could indicate an error.

      Alternatively, assert. See also log2i and log2i_graceful.

      Also, gtests if possible.

            szaldana Sonia Zaldana Calles
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: