RFR: 8301659: Resolve initialization reordering issues on Windows for libawt and libsaproc
Julian Waters
jwaters at openjdk.org
Thu Feb 2 15:17:29 UTC 2023
On Thu, 2 Feb 2023 12:12:37 GMT, Kevin Walls <kevinw at openjdk.org> wrote:
> (In the description you mean it is required for JDK-8288293.)
Ah, yes that was what I meant, sorry for the oversight
kevin and aivanov: When compiling for Windows with gcc instead of Visual C++, gcc will raise the following warnings
`m_nCounter is initialized before m_nDestroyPeriod [-Werror=reorder]` for libawt
`bytePtr is initialized before releaseMode [-Werror=reorder]` for libsaproc
(Note that the Windows JDK itself cannot yet be compiled with gcc, these errors were found on a local experimental branch)
Both will also get promoted to errors and cause build failures in debug or adhoc builds. All can be easily suppressed by disabling the reorder warning, but there isn't much of a reason to do so when you could easily fix the initializer list directly
Thanks for the heads up, will add more details to the main PR comment and the linked entry in JBS first
-------------
PR: https://git.openjdk.org/jdk/pull/12382
More information about the serviceability-dev
mailing list