RFR(XS): 8042885: java does not take hexadecimal number as vm option

Dmitry Samersoff dmitry.samersoff at oracle.com
Thu May 15 19:34:08 UTC 2014


On 2014-05-15 23:31, Yumin Qi wrote:
> Dmitry,
> 
>   Thanks for the suggestion, I like to keep the old one since we need
> check both 'x' and 'X', also it is more straight forward.

OK.

PS:
 (c & ~0x80) lowercase c so both 'X' and 'x' handled.

-Dmitry

> 
> --Yumin
> 
> On 5/15/2014 12:19 PM, Dmitry Samersoff wrote:
>> Yumin,
>>
>> You might consider to simplify the code a bit:
>>
>>   const char *fmt =
>>     ((*(s+1) & ~0x80) == 'x') ? "0x" JULONG_FORMAT_X : JULONG_FORMAT;
>>
>>   args_read = sscanf(s, fmt, &n);
>>
>> -Dmitry
>>
>>
>> On 2014-05-13 21:24, Yumin Qi wrote:
>>> Hi, please review the small change for
>>>
>>> bug: https://bugs.openjdk.java.net/browse/JDK-8042885
>>> webrev: http://cr.openjdk.java.net/~minqi/8042885/
>>>
>>> Summary: Java does not take number with hexadecimal format as options,
>>> like -XX:SharedBaseAddress=0x1D000000 will cause VM exit with improper
>>> argument. For addresses, we more like to use hexadecimal format since it
>>> is close to machine address display naturally.
>>>
>>> Tests: JPRT and manual test:  java -XX:UnlockDiagnosticVMOptions
>>> -XX:SharedBaseAddress=0x1D000000 -Xshare:dump
>>>
>>> Thanks
>>> Yumin
>>
> 


-- 
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.


More information about the hotspot-runtime-dev mailing list