[lworld] RFR: 8354694: [lworld] Refactor AssertUnsetFields to Early Larval Frame

Chen Liang liach at openjdk.org
Mon Apr 28 17:13:00 UTC 2025


On Mon, 28 Apr 2025 16:47:34 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

>> src/hotspot/share/classfile/stackMapTable.cpp line 298:
>> 
>>> 296:     _parsed_frame_count++;
>>> 297:   }
>>> 298: 
>> 
>> If we have no early_larval wrapping, and there is no more `uninitializedThis` in locals, we implicitly set unset fields to empty. See last sentence in section 4.7.4.
>> 
>> So for control flow like:
>> 
>> 
>> if (check) {} else {}
>> this.strictField = xxx;
>> super();
>> if (check1) {} else {}
>> 
>> The frame at first then-else merge has `strictField` unset, but the frame at 2nd else branch off must not be wrapped in early_larval, and verifier must accordingly clear the unset fields.
>
> I'm not following. Placing a non-empty Early_Larval frame with without `uninitializedThis` results ina verify error.

Good. You must have cleared the unset fields when flagThisUninit is not set in somewhere else.

-------------

PR Review Comment: https://git.openjdk.org/valhalla/pull/1435#discussion_r2064120571


More information about the valhalla-dev mailing list