RFR: 8297606: [AIX] Broken build after JDK-8295475
Tyler Steele
tsteele at openjdk.org
Fri Dec 2 17:49:18 UTC 2022
On Thu, 1 Dec 2022 10:48:07 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> Recent changes (https://github.com/openjdk/jdk/pull/10745) to ResourceObj, have caused the build to fail on AIX. This is because the AIX compiler (xlclang++) complains if 'operator new' is called on a class where 'operator delete' is marked as deleted (ie. `operator delete(void*) = delete`). This is the case even when 'operator new' is explicitly defined.
>>
>> It is my understanding that future PRs will migrate many instances of ResourceObj to AnyObj (or other classes), so it's possible this work-around could be removed in the future. An alternate solution is to change ResouceObj to AnyObj in 61 places. This alternative solution works since AnyObj defines both 'operator new' and 'operator delete'. This is both a much bigger change, and doesn't provide any additional benefit if instances of ResourceObj are being reviewed anyway.
>
> If I replace -fno-exception with -fexception in compiledIC.o.cmdline I get the same error that is listed in the bug report. Could you show the contents of your compiledIC.o.cmdline file in the build directory?
As suggested by @stefank and @kimbarrett, adding fno-expections to the xlc build fixes the problem. I have modified the PR accordingly.
Honorable mention to @tstuefe: I think your inline solution is nicer if we had gone that route.
And finally, to @dholmes-ora, I think its worth talking to the XLC team about the difference between the two compilers pointed out by this issue. It's probably not often the case that someone defines operator new, but marks operator delete as deleted, so it may not have been seen as a valid use case.
-------------
PR: https://git.openjdk.org/jdk/pull/11443
More information about the hotspot-runtime-dev
mailing list