RFR(XS): 8079825: Uninitialised variable in hotspot/src/share/vm & cpu/x86/vm (runtime)
Yumin Qi
yumin.qi at oracle.com
Fri Jul 17 18:14:03 UTC 2015
Calvin,
Looks good.
Thanks
Yumin
On 7/16/2015 10:09 AM, Calvin Cheung wrote:
> This is for fixing some warnings about uninitialized variables
> reported by our internal code analysis tool.
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8079825
> (this is a confidential bug)
>
> webrev: http://cr.openjdk.java.net/~ccheung/8079825/webrev.00/
>
> [1] Uninitialised pointer localvariable_type_table_start may be used
> as argument
> 8 when calling ClassFileParser::copy_localvariable_table at line 2465 of
> hotspot/src/share/vm/classfile/classFileParser.cpp in function
> ClassFileParser::parse_method
>
> Similar warning message for the other 3 local variables.
>
> The fix in classFileParser.cpp is for initializing the following
> variables to NULL:
> localvariable_table_length,
> localvariable_table_start,
> localvariable_type_table_length,
> localvariable_type_table_start
>
> They may not be defined if the execution path goes through the if
> block at line 2137:
> if (LoadLineNumberTables &&
> _cp->symbol_at(code_attribute_name_index) ==
> vmSymbols::tag_line_number_table()) {
> // Parse and compress line number table
> parse_linenumber_table(code_attribute_length, code_length,
> &linenumber_table, CHECK_(nullHandle));
>
> [2] Uninitialised pointer rf may be used as argument 1 when calling
> RFrame::set_distance at line 96 of
> hotspot/src/share/vm/runtime/rframe.cpp in
> function RFrame::new_RFrame
>
> The fix in rframe.cpp is for initializing the rf to NULL.
>
> It isn't being initialized if the execution path goes to the else block:
> } else {
> assert(false, "Unhandled frame type");
> }
>
> the assert is only for debug build.
>
> Testing:
> JPRT
> Aurora adhoc run including vm.quick on linux, windows (32- and
> 64-bit), and solaris sparc and x64
>
> Thanks in advance for your review.
>
> Calvin
>
More information about the hotspot-runtime-dev
mailing list