Bug 140709 - [ltw] Patch: Handle weaving while initializing properly
Summary: [ltw] Patch: Handle weaving while initializing properly
Status: REOPENED
Alias: None
Product: AspectJ
Classification: Tools
Component: LTWeaving (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-08 18:45 EDT by Ron Bodkin CLA
Modified: 2009-08-30 02:49 EDT (History)
0 users

See Also:


Attachments
Loadtime module patch (826 bytes, patch)
2006-05-08 18:52 EDT, Ron Bodkin CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ron Bodkin CLA 2006-05-08 18:45:05 EDT
This patch came about from a bug I was seeing that happened because a class was loaded and woven during initializing of the ClassLoaderWeavingAdaptor. The only safe thing to do in this case is to not weave until initialization occurs.
Comment 1 Ron Bodkin CLA 2006-05-08 18:52:49 EDT
Created attachment 40669 [details]
Loadtime module patch

I previously wrote and tested this logic so that the second thread would proceed without being woven. But I think that's a worse approach than the attached patch, which simply synchronizes so that initialization has to complete on the first thread before another thread can get the weaving adaptor.
Comment 2 Matthew Webster CLA 2006-06-05 09:17:13 EDT
This bug is related to if not a duplicate of bug 122580.
Comment 3 Matthew Webster CLA 2006-06-05 11:51:49 EDT
Without further information about which level of AspectJ, which level/version of JDK, which class, stack trace, verbose log or even a testcase I am very reluctant to add synchronization to the weaver. We have had deadlock problems before (Bug 99861, Bug 109344). Also all weaving for a particular class loader is single threaded and all static initialization is static a fail to understand (given the information provided) what actual problem we are trying to solve.
Comment 4 Ron Bodkin CLA 2006-06-06 00:36:49 EDT
It's been a few months since I ran into this issue so my recollection is a bit vague on the particulars. I will test more with recent builds and reopen the problem when I have a concrete test case.
Comment 5 Eclipse Webmaster CLA 2009-08-30 02:49:00 EDT
LATER/REMIND bugs are being automatically reopened as P5 because the LATER and REMIND resolutions are deprecated.