In os::processor_id() on macOS, a CAS protects initialization of processor ID number given an APIC id. However, the CAS is not converted properly to a boolean determining whether it succeeded or failed. The implicit boolean conversion is wrong, allowing multiple threads to increment the next processor ID. The result is that we can get IDs that are higher than the number of processors.
- relates to
-
JDK-8224816 Provide os::processor_id() implementation for Mac OS
-
- Resolved
-