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

David Holmes dholmes at openjdk.java.net
Mon May 23 02:51:46 UTC 2022


On Tue, 17 May 2022 15:56:28 GMT, Tyler Steele <tsteele 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?

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

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


More information about the hotspot-dev mailing list