RFR: 8234509: Race in macOS os::processor_id()
Robbin Ehn
robbin.ehn at oracle.com
Thu Nov 21 09:23:41 UTC 2019
Looks good, thanks, Robbin
On 2019-11-21 10:15, erik.osterlund at oracle.com wrote:
> Hi,
>
> 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 if another thread runs on a different APIC id, we can get IDs that are
> higher than the number of processors.
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8234509
>
> Webrev:
> http://cr.openjdk.java.net/~eosterlund/8234509/webrev.00/
>
> Thanks,
> /Erik
More information about the hotspot-runtime-dev
mailing list