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

Tyler Steele tsteele at openjdk.org
Mon Feb 27 06:40:58 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)).

My mistake! I commented on an earlier version of the code in which Deepa used free, and asked them to change to delete. So, it is my misunderstanding here.

Thanks for clarifying that it depends on the allocator used rather than a feature of the project as I had thought.

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

PR: https://git.openjdk.org/jdk/pull/12742


More information about the hotspot-runtime-dev mailing list