eclipse-platform / eclipse-platform/eclipse.platform

Few WorkManager fields are not MT safe

Open
#2,148 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
165
Forks
174
Avg merge
2d 8h
Merged PRs (30d)
22

Description

While debugging https://github.com/eclipse-jdt/eclipse.jdt.core/issues/4370 I've noticed that in the `org.eclipse.core.internal.resources.WorkManager` few fields are not volatile/atomic but could be accessed from different threads, so even if the modification happens while holding workspace locks, other threads might see stale values.

Fields in question are
- `WorkManager.operationCanceled`
- `WorkManager.nestedOperations`
- `WorkManager.preparedOperations`

I don't have reproducer, but I think making the fields either volatile or atomic shouldn't harm.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.