RFR: 8215487: ZGC: ZRuntimeWorkers incorrectly identify themselves as ZWorkers
ZThread::is_worker() incorrectly returns true when executed from a ZRuntimeWorkers context. This function should only return true when executed from a ZWorker context. This issue can lead to data corruption as a ZRuntimeWorker might read and write to data structures that are thread local to a ZWorker. With this patch, the ZRuntimeWorkers will execute an initialize task (similar to what ZWorkers already do) to initialize the "worker type" data. Bug: https://bugs.openjdk.java.net/browse/JDK-8215487 Webrev: http://cr.openjdk.java.net/~pliden/8215487/webrev.0 /Per
Hi Per, Looks good. Thanks, /Erik On 2018-12-17 15:49, Per Liden wrote:
ZThread::is_worker() incorrectly returns true when executed from a ZRuntimeWorkers context. This function should only return true when executed from a ZWorker context. This issue can lead to data corruption as a ZRuntimeWorker might read and write to data structures that are thread local to a ZWorker.
With this patch, the ZRuntimeWorkers will execute an initialize task (similar to what ZWorkers already do) to initialize the "worker type" data.
Bug: https://bugs.openjdk.java.net/browse/JDK-8215487 Webrev: http://cr.openjdk.java.net/~pliden/8215487/webrev.0
/Per
Thanks Erik! /Per On 12/17/2018 04:28 PM, Erik Österlund wrote:
Hi Per,
Looks good.
Thanks, /Erik
On 2018-12-17 15:49, Per Liden wrote:
ZThread::is_worker() incorrectly returns true when executed from a ZRuntimeWorkers context. This function should only return true when executed from a ZWorker context. This issue can lead to data corruption as a ZRuntimeWorker might read and write to data structures that are thread local to a ZWorker.
With this patch, the ZRuntimeWorkers will execute an initialize task (similar to what ZWorkers already do) to initialize the "worker type" data.
Bug: https://bugs.openjdk.java.net/browse/JDK-8215487 Webrev: http://cr.openjdk.java.net/~pliden/8215487/webrev.0
/Per
participants (2)
-
Erik Österlund
-
Per Liden