Request for review 8005075: CDS archive with one alignment causes crash when run with different alignment

Coleen Phillimore coleen.phillimore at
Tue Dec 18 13:20:18 PST 2012

This looks good.

On 12/18/2012 02:58 PM, harold seigel wrote:
> Please review the modified fix for bug 8005076.  The modified fix can 
> be viewed at 
> <>
> It contains two changes from the previous fix.
> As requested by Vitaly, the diagnostic in filemap.cpp has been changed 
> to include the incompatible ObjectAlignmentInBytes values.  Here's 
> sample new message:
>     The shared archive file's ObjectAlignmentInBytes of 8 is too small
>     for the current ObjectAlignmentInBytes of 16.
> Also, the change to arguments.cpp no longer sets a minimum value for 
> -XX:+ObjectAlignmentInBytes.  (This was requested by Coleen.)

      ^^ -XX:SharedReadOnlySize.

> Thanks, Harold
> On 12/17/2012 7:10 PM, Vitaly Davidovich wrote:
>> Hi Harold,
>> It might be useful to report the recorded alignment in the CDS 
>> archive in the diagnostic message that you print out.  What do you think?
>> Thanks
>> Sent from my phone
>> On Dec 17, 2012 10:24 AM, "harold seigel" <harold.seigel at 
>> <mailto:harold.seigel at>> wrote:
>>     Please review the following change to fix bug 8005075.
>>     Summary:  This change prevents a crash when a CDS archive is
>>     created with a value for -XX:+ObjectAlignmentInBytes that is
>>     smaller than the ObjectAlignmentInBytes value used when running
>>     with -Xshare:on.  This fix stores the ObjectAlignmentInBytes in
>>     the CDS archive so that when the archive is read, hotspot can
>>     compare the archive's alignment with the current alignment and
>>     issue the following diagnostic if the archive's alignment is too
>>     small:
>>         An error has occurred while processing the shared archive file.
>>         The shared archive file was created with a smaller Object
>>         Alignment value.
>>     This webrev also cleans up some text in globals.hpp and fixes a
>>     small problem with -XX:SharedReadOnlySize.  The existing code was
>>     always setting SharedReadOnlySize to 14M regardless of what was
>>     requested.  This prevented users from being able to expand the
>>     CDS archive's SharedReadOnly section.
>>     Open webrev at
>>     <>
>>     Bug link at
>>     The changes were tested with JCK, JPRT, JTREG, and UTE tests, and
>>     with hand-run tests using different ObjectAlignmentInBytes values.
>>     Thanks, Harold

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the hotspot-runtime-dev mailing list