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

Julian Waters jwaters at openjdk.org
Fri Sep 27 07:11:42 UTC 2024


On Thu, 26 Sep 2024 16:08:39 GMT, Vladimir Kozlov <kvn 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.

I see. I would prefer if it was commented, but as everyone else is fine with this change I will approve as well

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

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


More information about the hotspot-compiler-dev mailing list