Request for review (XS): crash in C2 when using -XX:+CountCompiledCalls
rednaxelafx at gmail.com
Wed May 16 09:13:41 PDT 2012
Thank you, Vladimir :-)
On Thu, May 17, 2012 at 12:12 AM, Vladimir Kozlov <
vladimir.kozlov at oracle.com> wrote:
> Changes looks good. I will push it tomorrow.
> On 5/16/12 6:02 AM, Krystal Mok wrote:
>> Hi all,
>> Could I get some reviews for this patch, please?
>> C2 may crash when compiling methods with -XX:+CountCompiledCalls turned
>> on. The cause is
>> in Parse::count_compiled_calls(), where it made a TypeInstPtr from a
>> const TypeInstPtr* addr_type = TypeInstPtr::make(method());
>> Since the klass of a ciMethod is a ciMethodKlass, which isn't a
>> ciInstanceKlass, an assertion is hit later in
>> Compile::flatten_alias_type(), where it's expecting a TypeInstPtr to have
>> a ciInstanceKlass:
>> ciInstanceKlass *k = to->klass()->as_instance_**klass();
>> An example of the crash is available here: https://gist.github.com/**
>> 2710000 <https://gist.github.com/2710000>
>> In the example, I started a Groovy shell with -XX:+CountCompiledCalls
>> set, and it crashed quickly when compiling
>> The fix is to use TypeOopPtr::make_from_**constant(method()) instead of
>> I did check the hg history, and looks like it's been like this since
>> duke at 0. Wonder if there's any history behind this.
>> Note that this fix may have to be changed again when methodOopDesc's are
>> moved out of PermGen.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-compiler-dev