Corrected: RFR 8059557 (XL): Validate JVM Command-Line Flag Arguments
Dmitry Dmitriev
dmitry.dmitriev at oracle.com
Thu May 21 20:25:41 UTC 2015
Gerard,
My comments inline.
On 21.05.2015 19:13, Gerard Ziemski wrote:
> hi Dmitry,
>
> Thank you for taking the time to review this considerable change for
> an n-th time now :-)
You are welcome! :)
>
> On 5/18/2015 7:55 AM, Dmitry Dmitriev wrote:
>> Hi Gerard,
>>
>> Can you please correct format string for jio_fprintf function in the
>> following functions(all from
>> src/share/vm/runtime/commandLineFlagRangeList.cpp):
>> Flag::Error check_intx(intx value, bool verbose = true)
>> Portion of format string from "intx %s = %ld is outside ..." to "intx
>> %s = "INTX_FORMAT" is outside ..."
>>
>> Flag::Error check_uintx(uintx value, bool verbose = true)
>> Portion of format string from "uintx %s = %lu is outside ..." to
>> "uintx %s = "UINTX_FORMAT" is outside ..."
>>
>> Flag::Error check_uint64_t(uint64_t value, bool verbose = true)
>> Portion of format string from "uint64_t %s = %lu is outside ..." to
>> "uint64_t %s = "UINT64_FORMAT" is outside ..."
>
> Are you sure you are looking at the current webrev? I know I sent you
> many before internally, but the rev0 and rev1 seem to already include
> the changes you request?
>
> I have, however, modified CICompilerCount range max value as you
> requested, ie. to "max_jint" instead of "max_intx" to avoid a
> potential overflow issue you found.
Thank you for modifing CICompilerCount! Concerning format issue... Yes,
I think that it still exist. Unfortunately I didn't catch it before. So,
I still see following code in the
src/share/vm/runtime/commandLineFlagRangeList.cpp module.
For example, from this link in rev1:
http://cr.openjdk.java.net/~gziemski/8059557_rev1/src/share/vm/runtime/commandLineFlagRangeList.cpp.html
44 Flag::Error check_intx(intx value, bool verbose = true) {
45 if ((value < _min) || (value > _max)) {
46 if (verbose == true) {
47 jio_fprintf(defaultStream::error_stream(),
48 "intx %s=%ld is outside the allowed range [ "INTX_FORMAT" ... "INTX_FORMAT" ]\n",
49 _name, value, _min, _max);
50 }
On line 48 after "=" sign I still see "%ld" format, but I think it must
be INTX_FORMAT with double quotes around. The same thing on lines 75 and
102 for uintx and uint64_t types where must be UINTX_FORMAT and
UINT64_FORMAT formats correspondingly.
size_t have correct formats(all SIZE_FORMAT for numeric values, line 129).
Thank you,
Dmitry
>
>
> cheers
>
More information about the hotspot-dev
mailing list