RFR: 8303082 : [AIX] Missing C++ name demangling with XLClang++ [v3]

Martin Doerr mdoerr at openjdk.org
Thu Mar 30 10:21:23 UTC 2023


On Mon, 27 Feb 2023 10:17:57 GMT, Deepa Kumari <duke at openjdk.org> wrote:

>> It was failing as It was using the C++ demangling interface (Demangle) of the old demangler (that is, the C++ API as opposed to the C one). It is not supported by xlclang++ on AIX.
>> To demangle names generated by xlclang++ , use cxxabi.h __cxa_demangle interface ( see cxxabi.h).
>> 
>> This Solution applies to the following test 
>> 
>> 1. SecondaryErrorTest.java`
>> 2. TestSigInfoInHsErrFile.java
>> 
>> 
>> Reported Issue : [JDK - 8303082](https://bugs.openjdk.org/browse/JDK-8303082)
>
> Deepa Kumari has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
> 
>   8303082 : [AIX] Missing C++ name demangling with XLClang++

Thanks for implementing it! Looks basically good to me. Please consider my suggestions.

src/hotspot/os/aix/porting_aix.cpp line 242:

> 240:         int status;
> 241:         char *demangled_name = abi::__cxa_demangle(p_name, nullptr, nullptr, &status);
> 242:         if ((demangled_name != nullptr) && (status == 0)) {

Should the `strncpy` better depend on `status == 0` and the `free` operation on `demangled_name != nullptr`? I'm not sure about the relationship between the two checks. Maybe your version is ok, too.

src/hotspot/os/aix/porting_aix.cpp line 246:

> 244:           p_name[namelen-1] = '\0';
> 245:           ALLOW_C_FUNCTION(::free, ::free(demangled_name));
> 246:           }

I suggest to fix the indentation.

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

PR Review: https://git.openjdk.org/jdk/pull/12742#pullrequestreview-1364792602
PR Review Comment: https://git.openjdk.org/jdk/pull/12742#discussion_r1153047075
PR Review Comment: https://git.openjdk.org/jdk/pull/12742#discussion_r1153047584


More information about the hotspot-runtime-dev mailing list