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

Bug 365610

Summary: Framework should ensure weaving hooks are presented with byte code in a class cache environment
Product: [Eclipse Project] Equinox Reporter: Thomas Watson <tjwatson>
Component: FrameworkAssignee: Thomas Watson <tjwatson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sykesm.oss, tjwatson
Version: 3.7   
Target Milestone: 3.7.2   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 361390    
Bug Blocks:    

Description Thomas Watson CLA 2011-12-05 10:05:21 EST
Cloning bug to backport to 3.7.2.


+++ This bug was initially created as a clone of Bug #361390 +++

Build Identifier: 3.7.0.v20110613

When working with Apache Aries in an environment running on an IBM J9 JVM, the 'class data sharing' adapter for eclipse is returning a shared class cache token to the framework out of a class loading hook.  The token is then getting passed to the OSGi weaving hooks where the weavers are falling because the class bytes are invalid.

Perhaps there should be a mechanism where the framework attempts to verify that the byte code returned from load hook has a proper byte code magic of 'CAFEBABE' before passing it to the weaving hooks?


Reproducible: Always

Steps to Reproduce:
1. Run equinox on an IBM JDK with the CDS framework extension
2. Enable a weaving hook
3. Note that the weaving hook does not get class bytes by the shared class cache token
Comment 1 Thomas Watson CLA 2011-12-05 10:52:19 EST
I released the fix to 3.7.2 with the following commit:

http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?h=R3_7_maintenance&id=63ae272ea29e707045e07d3fe188b0382c46de9f