RFR: 8286891: thread_local causes undefined symbol error with XL C

Jorn Vernee jvernee at openjdk.java.net
Mon May 23 09:24:55 UTC 2022


On Mon, 23 May 2022 02:48:51 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> When using XLClang++ to compile a `thread_local` struct with a destructor, a compiler bug is exposed that results in a missing constructor and a linker error.
>> 
>> Adding the missing constructor solves this issue.
>> 
>> Changes
>> - Builds on AIX (previously broken)
>
> src/hotspot/share/prims/universalUpcallHandler.cpp line 51:
> 
>> 49:   #ifdef _AIX
>> 50:     UpcallContext() {}
>> 51:   #endif
> 
> I'd prefer for this to not be AIX specific. Adding an explicit empty constructor seems harmless enough - with a comment of course e.g.
> 
> UpCallContext() {} // Explicit constructor to avoid potential xlc compiler bug
> 
> @JornVernee what do you think?

Yeah, that seems better to me as well.

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

PR: https://git.openjdk.java.net/jdk/pull/8754


More information about the hotspot-dev mailing list