RFR: 8337679: Memset warning in src/hotspot/share/adlc/adlArena.cpp

Vladimir Kozlov kvn at openjdk.org
Thu Sep 26 16:11:38 UTC 2024


On Thu, 26 Sep 2024 10:34:30 GMT, Julian Waters <jwaters at openjdk.org> wrote:

> Hmm, wouldn't this make detecting bugs where memory is incorrectly accessed harder? (Seeing that's the purpose of this particular memset) Not sure if I'm missing anything here. Does the warning trigger if the memset is commented out?

We can use VM's variants `os::malloc()` and `os::free()` to catch dangling pointers as we do in other places in VM. This will avoid warning I think.
On other hand `adlc` is used only during VM build and using system's `free()` will not help to catch such issues anyway.
So I am fine with this change.

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

PR Comment: https://git.openjdk.org/jdk/pull/21200#issuecomment-2377386136


More information about the hotspot-compiler-dev mailing list