[crac] Withdrawn: merge compiler warning fixes from jdk17u-dev

Jan Kratochvil jkratochvil at openjdk.org
Thu Aug 3 05:10:00 UTC 2023


On Sat, 29 Jul 2023 21:38:31 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:

> ../../src/hotspot/share/gc/z/zReferenceProcessor.cpp: In member function 'oopDesc* ZReferenceProcessor::drop(oop, ReferenceType)':
> ../../src/hotspot/share/gc/z/zReferenceProcessor.cpp:270:22: error: '%s' directive argument is null [-Werror=format-overflow=]
>   270 |   log_trace(gc, ref)("Dropped Reference: " PTR_FORMAT " (%s)", p2i(reference), reference_type_name(type));
>       |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1plus: all warnings being treated as errors
> commit 68456bb248378da2ada5ecb6de92302988115b7c
> Author: Aleksey Shipilev <shade at openjdk.org>
> Date:   Thu Jun 23 15:49:41 2022 +0000
>     8288754: GCC 12 fails to build zReferenceProcessor.cpp
>     Backport-of: 834d92dd72257ab5d8c6759028098ac0867c5752
> 
> ../src/java.base/unix/native/libjli/java_md_common.c: In function 'Resolve':
> ../src/java.base/unix/native/libjli/java_md_common.c:125:43: error: '%s' directive output may be truncated writing up to 4095 bytes into a region of size between 2 and 4097 [-Werror=format-truncation=]
>   125 |     JLI_Snprintf(name, sizeof(name), "%s%c%s", indir, FILE_SEPARATOR, cmd);
>       |                                           ^~
> In file included from ../src/java.base/unix/native/libjli/java_md.h:38,
>                  from ../src/java.base/share/native/libjli/java.h:41,
>                  from ../src/java.base/unix/native/libjli/java_md_common.c:26:
> ../src/java.base/share/native/libjli/jli_util.h:103:41: note: 'snprintf' output between 2 and 8192 bytes into a destination of size 4098
>   103 | #define JLI_Snprintf                    snprintf
> ../src/java.base/unix/native/libjli/java_md_common.c:125:5: note: in expansion of macro 'JLI_Snprintf'
>   125 |     JLI_Snprintf(name, sizeof(name), "%s%c%s", indir, FILE_SEPARATOR, cmd);
>       |     ^~~~~~~~~~~~
> cc1: all warnings being treated as errors
> commit 46c1434d50f6f0fa371785496c4d37c0e192da16
> Author: Yasumasa Suenaga <ysuenaga at openjdk.org>
> Date:   Wed Jan 25 17:19:30 2023 +0000
>     8286562: GCC 12 reports some compiler warnings
>     Backport-of: 410a25d59a11b6a627bbb0a2c405c2c2be19f464
> 
> In function 'find_positions',
>     inlined from 'find_file' at ../src/java.base/share/native/libjli/parse_manifest.c:364:9:
> ../src/java.base/share/native/libjli/parse_manifest.c:292:34: error: pointer 'endpos' used after 'free' [-Werror=use-after-free]
>   292 |             pos = flen - (endpos - cp);
>       |                          ~~~~~~~~^~~~~
> ../src/java.base/share/native/libjli/parse_manifest.c:291:13: note: call to 'free' h...

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/crac/pull/96


More information about the crac-dev mailing list