Bug 568534 - org.eclipse.jdt.internal.core.search.indexing.IndexRequest.isCancelled is not volatile
Summary: org.eclipse.jdt.internal.core.search.indexing.IndexRequest.isCancelled is not...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.18 M3   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-04 11:07 EST by Andrey Loskutov CLA
Modified: 2020-11-17 09:49 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2020-11-04 11:07:32 EST
While debugging bug 566262 I've stumbled over this issue.

org.eclipse.jdt.internal.core.search.indexing.IndexRequest.isCancelled is not volatile but it is accessed from multiple threads, not always inside synchronized blocks => the threads may see a stale, not up-to-date version of the object.

I will push a patch.
Comment 1 Eclipse Genie CLA 2020-11-04 11:10:43 EST
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/171750
Comment 3 Vikas Chandra CLA 2020-11-17 09:49:46 EST
verified by code inspection