> Hello,
> 
> When looking at the usages of 
> `InstanceKlass::get_inline_type_field_klass_or_null` I saw that 
> `SystemDictionary::try_preload_from_loadable_descriptors` uses the returned 
> value even though it may be null, which can result in a SIGSGV. This change 
> aligns well with what is done just above in 
> `SystemDictionary::preload_from_null_free_field`, using the local variable 
> `name` instead of getting the name from the klass.
> 
> Given the right conditions this will result in a crash, but it seems rare as 
> it requires "the stars to be aligned just right" for it to happen.
> 
> I'm not sure how much testing testing there is for classes which have inlined 
> and non-inlined fields in them in connection to the code being changed. Such 
> classes would result in an inline_layout_info_array having null-entires, 
> since it is a sparse array.
> 
> Testing:
> * Oracle's tier1-3
> * Testing with a local reproducer that this does not crash with the changes
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Joel Sikström has updated the pull request incrementally with two additional 
commits since the last revision:

 - Adjust indentation to match first line
 - Remove second printing of class name

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

Changes:
  - all: https://git.openjdk.org/valhalla/pull/2344/files
  - new: https://git.openjdk.org/valhalla/pull/2344/files/22f68cb2..c1607825

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=valhalla&pr=2344&range=01
 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=2344&range=00-01

  Stats: 8 lines in 1 file changed: 0 ins; 2 del; 6 mod
  Patch: https://git.openjdk.org/valhalla/pull/2344.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2344/head:pull/2344

PR: https://git.openjdk.org/valhalla/pull/2344

Reply via email to