On Wed, 21 May 2025 15:03:51 GMT, Ioi Lam <ik...@openjdk.org> wrote: >> Thanks for the pointers; in fact I had the problem with a (intermediate) >> variant that encoded the symbol addresses right into the stream. Therefore >> the issue was comparing value of symbol values before CDS persisting those >> and after dehydration. Since we're comparing only symbols within single >> class, I hope that the issue you describe above won't happen. I'll keep the >> problem with dynamic archives in mind, though. >> With the current code I can try using `fast_compare` again and get back if I >> find any problems again. > > Even if the fields are only defined within the same class, the names of the > fields are shared among different classes.
To validate that you have sorted the table correctly, you should add a debug-only validation function. This function should be called after `set_fieldinfo_search_table()`, and also in `InstanceKlass::restore_unshareable_info()` and `InstanceKlass::remove_unshareable_info()`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24847#discussion_r2100546703