[15] RFR(XS): 8239069: C2: SIGSEGV in IdealGraphPrinter::walk_nodes due to C->root() being NULL
Tobias Hartmann
tobias.hartmann at oracle.com
Fri Feb 14 10:43:58 UTC 2020
+1
Best regards,
Tobias
On 14.02.20 11:41, Nils Eliasson wrote:
> Hi Christian,
>
> Looks good!
>
> Best regards,
> Nil
>
> On 2020-02-14 10:56, Christian Hagedorn wrote:
>> Hi
>>
>> Please review the following patch:
>> https://bugs.openjdk.java.net/browse/JDK-8239069
>> http://cr.openjdk.java.net/~chagedorn/8239069/
>>
>> This happens for the method in the replay file because C2 calls Compile::record_failure() twice
>> consecutively which calls Compile::print_method() each time. In the first call of
>> Compile::record_failure(), it sets _root to NULL after printing the ideal graph [1]. In the second
>> call of Compile::record_failure(), it calls Compile::print_method() again. But this time C->root()
>> is NULL. As a result, it crashes later at [2] when trying to dereference 'start' which is
>> C->root() and therefore NULL.
>>
>> The fix is straight forward to not print the ideal graph if the root node to start the printing is
>> NULL. This crash only happens in rare cases.
>>
>>
>> Thank you!
>>
>> Best regards,
>> Christian
>>
>>
>> [1] http://hg.openjdk.java.net/jdk/jdk/file/f82f59ef79f0/src/hotspot/share/opto/compile.cpp#l3940
>> [2]
>> http://hg.openjdk.java.net/jdk/jdk/file/f82f59ef79f0/src/hotspot/share/opto/idealGraphPrinter.cpp#l622
>>
>
More information about the hotspot-compiler-dev
mailing list