RFR: JDK-8323190: Segfault during deoptimization of C2-compiled code [v3]
Christian Hagedorn
chagedorn at openjdk.org
Thu Jan 11 07:50:23 UTC 2024
On Wed, 10 Jan 2024 18:11:14 GMT, Cesar Soares Lucas <cslucas at openjdk.org> wrote:
>> src/hotspot/share/opto/output.cpp line 1092:
>>
>>> 1090: ObjectMergeValue* mv = (ObjectMergeValue*) sv_for_node_id(objs, smerge->_idx);
>>> 1091:
>>> 1092: if (mv == NULL) {
>>
>> You should replace `NULL` with `nullptr` here and below. This also seems wrong here where you took the code from:
>> https://github.com/openjdk/jdk/blob/88378ed0584c7eb0849b6fc1e361fd8ea0698caf/src/hotspot/share/opto/output.cpp#L775-L796
>>
>> On a separate note, the code looks almost identical. Could it be shared somehow?
>
> Thank you for reviewing @chhagedorn. I've converted the NULLs to nullptrs. However, I'll defer the refactoring of the identical code to a RFE - mainly because I'll have to backport the current patch and I'd like to keep it as minimal as possible. Please let me know if you disagree.
That's perfectly fine, especially since the code for the `is_SafePointScalarObject()` case was already duplicated before. So, we could change both in one go in a follow-up RFE.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17333#discussion_r1448432678
More information about the hotspot-compiler-dev
mailing list