Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365610 - Framework should ensure weaving hooks are presented with byte code in a class cache environment
Summary: Framework should ensure weaving hooks are presented with byte code in a class...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7.2   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 361390
Blocks:
  Show dependency tree
 
Reported: 2011-12-05 10:05 EST by Thomas Watson CLA
Modified: 2011-12-05 10:52 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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