Bug 319431 - bug in deserialization of uncompressed WeaverStateInfo
Summary: bug in deserialization of uncompressed WeaverStateInfo
Status: RESOLVED FIXED
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: 1.6.10   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-09 16:36 EDT by Andrew Clement CLA
Modified: 2010-07-12 14:44 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-09 16:36:03 EDT
Recently in 1.6.10 dev builds we are moving back to a mode where WeaverStateInfo is not compressed.  Although the non-compressed form is supported, it doesn't quite behave in one small respect.  The WeaverStateInfo encapsulates the list of aspects affecting a type.  When compression is turned off there was a bug in the reading code that didn't correctly process what had been written - it was left over from some attempts to change the format and looks like the writing code had been tidied up but this reader code had not.  Unfortunately as compression was the default for 1.6.9, all testing was run with compression ON and this was not found.

What is the impact?  The list of aspects is used in two places, reweaving and overweaving.  When reweaving the list is used to confirm the right aspects are around for reweaving to succeed.  When overweaving the list is used to prevent aspects being applied twice.

The most serious impact of this bug is on overweaving.
Comment 1 Andrew Clement CLA 2010-07-09 16:36:55 EDT
the fix is just to tidy up the reader logic.
Comment 2 Andrew Clement CLA 2010-07-12 14:44:46 EDT
not that simple.

If the class file being processed is < 1.6.9 (eg. built with 1.6.8) then it contains 'names' in the uncompressed section, not signatures.  This means the read logic is still required to convert names to signatures.  So it isn't enough to say let's switch from compressed to uncompressed for WeaverStateInfo, we also have to change to say "and if uncompressed, if the original class is < 1.6.9 then it needs names converting to signatures"