[lworld] RFR: 8351979: Improve verification error messages for strict fields

Matias Saavedra Silva matsaave at openjdk.org
Fri Mar 14 16:29:16 UTC 2025


On Fri, 14 Mar 2025 16:14:54 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> This patch adds more detail to the verifier errors throws when there are problems with strict instance fields. The class name and one field name is now printed. Verified with tier 1-3 tests.
>
> src/hotspot/share/classfile/stackMapFrame.cpp line 71:
> 
>> 69:     sig->as_C_string(),
>> 70:     klass->name()->as_C_string()
>> 71:   );
> 
> I wonder if you need a ResourceMark here.  Also, I wonder if you could use a stringStream here and concatenate all the names and signatures of the unset fields?

Placing a ResourceMark here messes with the error message so I opted not to use one.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1400#discussion_r1995879138


More information about the valhalla-dev mailing list