8005076: Creating a CDS archive with one alignment and running another causes a crash

Save the alignment when writing the CDS and compare it when reading the CDS.

Reviewed-by: kvn, coleenp
This commit is contained in:
Harold Seigel 2013-01-08 13:38:11 -05:00
parent 89e575df23
commit cfea76669a
4 changed files with 19 additions and 16 deletions

View file

@ -63,6 +63,7 @@ private:
int _magic; // identify file type.
int _version; // (from enum, above.)
size_t _alignment; // how shared archive should be aligned
int _obj_alignment; // value of ObjectAlignmentInBytes
struct space_info {
int _file_offset; // sizeof(this) rounded to vm page size