Skip to content

Few WorkManager fields are not MT safe #2148

@iloveeclipse

Description

@iloveeclipse

While debugging eclipse-jdt/eclipse.jdt.core#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions