RFR: JDK-8298908: Instrument Metaspace for ASan [v2]

Justin King jcking at openjdk.org
Mon Jan 9 15:57:59 UTC 2023


On Mon, 9 Jan 2023 08:05:47 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Ah I see.
>
> I like this, but would compilers not complain about unused statements?

I don't believe so, at least not based on current options. Other projects use similar tricks, like ABSL_DCHECK from Abseil which short circuits expressions when in non-debug builds causing the code to be unreachable and stripped. If it does, we can always just remove the if statement part and have it evaluate anyway. Most compilers should realize that the statements are unused and should be pruned.

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

PR: https://git.openjdk.org/jdk/pull/11702


More information about the hotspot-runtime-dev mailing list