Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358806

Summary: ContextinjectionFactory.make() is not thread safe
Product: [Eclipse Project] Platform Reporter: Bryan Hunt <bhunt>
Component: RuntimeAssignee: platform-runtime-inbox <platform-runtime-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: bugs.eclipse.org, ob1.eclipse, pwebster, remy.suen
Version: 4.2   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard: stalebug

Description Bryan Hunt CLA 2011-09-24 16:15:15 EDT
ContextInjectionFactory.make() calls InjectorImpl.make() which then calls InjectorImpl.internalMake() which accesses classesBeingCreated outside of a synchronized context.  If two different threads both call ContextInjectionFactory.make() with the same class, you can get an InjectionException.  Looking at the accesses to classesBeingCreated, it appears that the function was designed to be recursive, but I can't find any recursive calls the internalMake.  It seems that classesBeingCreated could be removed.
Comment 1 Lars Vogel CLA 2019-11-27 07:17:53 EST
This bug hasn't had any activity in quite some time. Maybe the problem got
resolved, was a duplicate of something else, or became less pressing for some
reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it.
The information can be, for example, that the problem still occurs, that you
still want the feature, that more information is needed, or that the bug is
(for whatever reason) no longer relevant.

If the bug is still relevant, please remove the stalebug whiteboard tag.