RFR(S): 8239497: SEGV in EdgeUtils::field_name_symbol(Edge const&)
Markus Gronlund
markus.gronlund at oracle.com
Tue Mar 17 22:13:33 UTC 2020
Hi Tony,
That is a good suggestion. I will make the initialization of *modifiers = 0 local to field_name().
Thanks
Markus
From: Tony Printezis <tprintezis at twitter.com>
Sent: den 17 mars 2020 22:43
To: Markus Gronlund <markus.gronlund at oracle.com>; hotspot-jfr-dev at openjdk.java.net
Subject: Re: RFR(S): 8239497: SEGV in EdgeUtils::field_name_symbol(Edge const&)
Hi Markus,
Thanks for fixing this! I’m not super familiar with the leak profiler code but the change looks OK to me.
One optional paranoid suggestion: in EdgeUtils::field_name(), *modifiers will not be set if the method returns NULL. It looks as if it’s set to 0 by the caller, so it should be OK. But does it make sense to set it to 0 in field_name() before returning NULL to future-proof this code a bit more?
Tony
—————
Tony Printezis | @TonyPrintezis | HYPERLINK "mailto:tprintezis at twitter.com"tprintezis at twitter.com
On March 17, 2020 at 10:51:11 AM, Markus Gronlund (HYPERLINK "mailto:markus.gronlund at oracle.com"markus.gronlund at oracle.com) wrote:
Greetings,
Please help review this change set:
Bug: https://bugs.openjdk.java.net/browse/JDK-8239497
Webrev: http://cr.openjdk.java.net/~mgronlun/8239497/webrev01/
Testing: jdk_jfr
Summary:
To find the proper field offsets for references as part of doing "path-to-gc-root" traversal, an instance of java/lang/Class must initially be described using its corresponding metadata, as an Instance(Mirror)Klass. Only after this can there be an attempt to resolve static fields, which will then instead use the metadata derived from the InstanceKlass the java/lang/Class represents. Please see bug for a full description.
Thanks to Tony Printezis for reporting this issue and for analyzing and testing this change set. Tony will be listed as "Contributed-by".
Thanks
Markus
More information about the hotspot-jfr-dev
mailing list