RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

Martin Doerr mdoerr at openjdk.org
Fri May 26 20:29:54 UTC 2023


On Fri, 26 May 2023 16:58:41 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> The crazy thing is that `malloc` is defined! That means all places where we use the term malloc are getting replaced without such a workaround. (E.g. for log tags.)
>
> So, we do this only for malloc? Not for calloc, posix_memalign, realloc etc? What about free? 
> 
> As ugly as defining malloc is (and I remember QADRT), I hesitate about removing that define.
> 
> Removing that define and hard-coding it here assumes 1) our replacement is equivalent (ok, easy to check) 2) it will always be equivalent in future AIX versions 3) pointers it returns work with the unchanged free() and realloc() the system provides, and will always do so.
> 
> I don't know... I would not do this just to get rid of a warning.

This one is not just to get rid of a warning. We get real test errors because malloc gets replaced by vec_malloc in log tags.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14146#discussion_r1207308708


More information about the hotspot-dev mailing list