Request for review: 8014138: Add VM option to facilitate the writing of CDS tests

Daniel D. Daugherty daniel.daugherty at oracle.com
Thu May 9 12:14:03 PDT 2013


On 5/9/13 1:10 PM, harold seigel wrote:
> I guess Parfait can't detect that strcat is copying a literal string?

The problem is overflow of the destination parameter.It presumes
if you are using the strncat() version that you're actually passing
a valid "remaining available space" value.

Dan


>
> On 5/9/2013 3:06 PM, Daniel D. Daugherty wrote:
>> On 5/9/13 12:56 PM, harold seigel wrote:
>>> Hi Zhengyu,
>>>
>>> Thanks for looking at this.  Comments inline.
>>>
>>> Harold
>>>
>>> On 5/9/2013 2:35 PM, Zhengyu Gu wrote:
>>>> Hi Harold,
>>>>
>>>> arguments.cpp
>>>>
>>>> 3186 - 3187: why not  strcat(shared_archive_path, "classes.jsa")
>>> I'll clean that up.
>>
>> I think strcat() will set off a Parfait warning. You should use
>> strncat() with the appropriate length parameters...
>>
>> Dan
>>
>>
>>>>
>>>> Also, I don't see where SharedArchiveFile is used.
>>> In function set_shared_archive_path(), if SharedArchiveFile is null 
>>> then the original archive file path is used.
>>> Else the value of SharedArchiveFile is copied to shared_archive_path 
>>> and returned as the function value.
>>>>
>>>> Thanks,
>>>>
>>>> -Zhengyu
>>>>
>>>>
>>>>
>>>> On 5/9/2013 1:44 PM, harold seigel wrote:
>>>>> Hi,
>>>>>
>>>>> Please review this fix for bug 8014138.
>>>>>
>>>>> This enhancement adds a new diagnostic option, 
>>>>> "-XX:SharedArchiveFile=<file-path>" that takes a string specifying 
>>>>> the path of the shared archive file. Note that if the option is 
>>>>> specified when the shared archive is written, then it must be used 
>>>>> when the shared archive is being read (i.e. -Xshare:on).
>>>>>
>>>>> This change was tested with JCK lang and vm tests, UTE 
>>>>> vm.quick.testlist and vm.mlvm.testlist tests, and jtreg tests. In 
>>>>> addition, the test included in this change was run on Linux 32/64, 
>>>>> Solaris 32/64, Windows 7, and Mac OS.
>>>>>
>>>>> Open webrev at http://cr.openjdk.java.net/~hseigel/bug_8014138/ 
>>>>> <http://cr.openjdk.java.net/%7Ehseigel/bug_8014138/>
>>>>>
>>>>> Bug link at http://bugs.sun.com/view_bug.do?bug_id=8014138
>>>>>
>>>>> Thanks, Harold
>>>>
>>>
>>
>



More information about the hotspot-runtime-dev mailing list