RFR: 8365526: Crash with null Symbol passed to SystemDictionary::resolve_or_null [v2]

David Holmes dholmes at openjdk.org
Mon Dec 22 00:30:05 UTC 2025


On Thu, 27 Nov 2025 00:10:48 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> I made a ticket for this: [8372373](https://bugs.openjdk.org/browse/JDK-8372373)
>
> @jdksjolen just to clarify one thing. There is a reason we defined the second constructor to not have to strdup. Given we start with a `stringStream` we have to first convert that to a `char*` representation, which is done via a C-heap array allocation. If the constructor then `strdup`'d that then we'd be copying the string twice. So instead we expect to get the C-heap version (which should also get freed when needed, but I think we missed that part).

Note the free'ing was incorrect - see [JDK-8372988](https://bugs.openjdk.org/browse/JDK-8372988)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28438#discussion_r2638249749


More information about the hotspot-runtime-dev mailing list