RFR: 8339313: JDK-8338888 broke 32-bit builds
David Holmes
dholmes at openjdk.org
Tue Sep 3 22:12:18 UTC 2024
On Mon, 2 Sep 2024 09:59:54 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> See JBS issue and comment history. GCC chokes on the native test code with bogus (AFAICS) fortify errors.
>
> In any case, since this code should not be compiled for 32-bit anyway, I exclude it. Trivial?
>
> Tested on x86 and x64. On x86, build succeeds, on x64 we still can run `runtime/exceptionMsgs/NoClassDefFoundError `successfully.
>
> Ping @dholmes-ora
There is also another fix needed as the array subscripting is invalid:
diff --git a/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c b/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c
index 023f299a5d4..334974ae21d 100644
--- a/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c
+++ b/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c
@@ -51,7 +51,7 @@ static char* giant_string() {
char* c_name = malloc(len * sizeof(char));
if (c_name != NULL) {
memset(c_name, 'Y', len - 1);
- c_name[len - 1] = '\0';
+ *(c_name + len - 1) = '\0';
}
return c_name;
}
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20809#issuecomment-2327529276
More information about the hotspot-runtime-dev
mailing list