RFR: 8303082 : [AIX] Missing C++ name demangling with XLClang++
Deepa Kumari
duke at openjdk.org
Mon Feb 27 06:41:00 UTC 2023
On Fri, 24 Feb 2023 15:21:07 GMT, Justin King <jcking 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)
>
> src/hotspot/os/aix/porting_aix.cpp line 241:
>
>> 239: if (demangle) {
>> 240: int status;
>> 241: char *demangled_name = abi::__cxa_demangle(p_name, NULL, NULL, &status);
>
> AFAIK __cxa_demangle uses malloc/realloc. Below you are using delete, please do not mix them. Instead use ALLOW_C_FUNCTION(::free, ::free(demangled_name)).
Thanks @jcking and @backwaterred for review the code.
-------------
PR: https://git.openjdk.org/jdk/pull/12742
More information about the hotspot-runtime-dev
mailing list