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

Implicit narrowing in Solaris/sparc initializer lists

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • None
    • hotspot
    • None
    • b16
    • sparc
    • solaris

      There are some initializer lists in Solaris/sparc code which contain implicitly narrowed values. Such are not permitted starting with C++11.

      In os::dll_load, the initialization of the arch_t lib_arch variable involves implicit narrowing. The nearby definition of arch_t has some char members where the initializers obtained from the system-supplied Elf32_Ehdr are of type unsigned char.

      In nativeInst_sparc.cpp, there are several test functions containing int[] offsets, where the values are all literals, with some being unsigned values with the high bit set.

            kbarrett Kim Barrett
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: