RFR: 8333639: ubsan: cppVtables.cpp:81:55: runtime error: index 14 out of bounds for type 'long int [1]'
Matthias Baesken
mbaesken at openjdk.org
Mon Jun 10 12:46:11 UTC 2024
On Mon, 10 Jun 2024 11:02:19 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
> We shouldn't specify a wrong array length which causes undefined behavior. Using a "flexible array member".
it seems to break the Windows build
d:\a\jdk\jdk\src\hotspot\share\cds\cppVtables.cpp(69): error C2220: the following warning is treated as an error
d:\a\jdk\jdk\src\hotspot\share\cds\cppVtables.cpp(69): warning C4200: nonstandard extension used: zero-sized array in struct/union
d:\a\jdk\jdk\src\hotspot\share\cds\cppVtables.cpp(69): note: This member will be ignored by a defaulted constructor or copy/move assignment operator
looks the the MSVC compiler is 'thinking' the same I was thinking :-) .
Should we better add an attribute to the function (maybe also a comment) ?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19623#issuecomment-2158245924
More information about the hotspot-runtime-dev
mailing list