On Tue, 16 Aug 2022 16:50:09 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:
>> When running with dynamic dump (`-XX:ArchiveClassesAtExit=foo.jsa`), >> `UseSharedSpaces` is true, so it's possible for a method to be rewritten >> here, and later dumped into the CDS archive). >> >> I think we should remove `!UseSharedSpaces`. I'll try to write a test case >> for it. If I understand correctly, even if `cache->is_vfinal()` is true at >> dump time, it's not guarantee to be true at run time (we might load a >> different version of the class that contains the target method). > > I thought if we run with dynamic dump, then `Arguments::is_dumping_archive()` > is `false`, and we don't rewrite. > > Anyway, if you remove `!UseSharedSpaces` here, like you did in PR update, > then this happens during Linux x86_64 Zero build: > > > $ CONF=linux-x86_64-zero-fastdebug make images > ... > Creating support/classlist.jar You're right. I added the `!UseSharedSpaces` back. I misread the code :-( ------------- PR: https://git.openjdk.org/jdk/pull/9869