Bug 319312 - compression of attributes has problems with other bytecode transformations
Summary: compression of attributes has problems with other bytecode transformations
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.9   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-08 15:56 EDT by Andrew Clement CLA
Modified: 2013-06-24 11:05 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Clement CLA 2010-07-08 15:56:47 EDT
If a secondary transform that modifies a class reorganizes the constant pool, this can break the compression 1.6.9 added for attributes.  Compression is done through referencing common strings in the constant pool from attributes rather than writing them out 'long hand' in the attributes themselves.  If a secondary transform affects the constant pool (moving things around or removing entries) then when AspectJ runs later (perhaps ltw), it cannot decode the compressed attributes and (usually) a classcastexception will occur.

The only (quick) solution here is to reduce the amount of compression - the longer term solution would be to manage our own mini constant pool that is serialized in another attribute.  This wouldn't save as much space (because it would duplicate some of the strings in the regular pool) but it would save some.
Comment 1 Andrew Clement CLA 2013-06-24 11:05:30 EDT
unsetting the target field which is currently set for something already released