RFR: 8288759: GCC 12 fails to compile signature.cpp due to -Wstringop-overread

Aleksey Shipilev shade at openjdk.org
Fri Aug 19 12:35:34 UTC 2022


On Wed, 17 Aug 2022 23:52:23 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Trying to compile with GCC 12.1.1 (current Fedora Rawhide) yields this failure:
>> 
>> 
>> In file included from /home/test/shipilev-jdk/src/hotspot/share/utilities/globalDefinitions_gcc.hpp:35,
>>                  from /home/test/shipilev-jdk/src/hotspot/share/utilities/globalDefinitions.hpp:35,
>>                  from /home/test/shipilev-jdk/src/hotspot/share/memory/allocation.hpp:29,
>>                  from /home/test/shipilev-jdk/src/hotspot/share/classfile/classLoaderData.hpp:28,
>>                  from /home/test/shipilev-jdk/src/hotspot/share/precompiled/precompiled.hpp:34:
>> In function 'const void* memchr(const void*, int, size_t)',
>>     inlined from 'int SignatureStream::scan_type(BasicType)' at /home/test/shipilev-jdk/src/hotspot/share/runtime/signature.cpp:343:32,
>>     inlined from 'void SignatureStream::next()' at /home/test/shipilev-jdk/src/hotspot/share/runtime/signature.cpp:373:19,
>>     inlined from 'void SignatureIterator::do_parameters_on(T*) [with T = Fingerprinter]' at /home/test/shipilev-jdk/src/hotspot/share/runtime/signature.hpp:635:41,
>>     inlined from 'void SignatureIterator::do_parameters_on(T*) [with T = Fingerprinter]' at /home/test/shipilev-jdk/src/hotspot/share/runtime/signature.hpp:629:6,
>>     inlined from 'void Fingerprinter::compute_fingerprint_and_return_type(bool)' at /home/test/shipilev-jdk/src/hotspot/share/runtime/signature.cpp:169:19:
>
> src/hotspot/share/runtime/signature.cpp line 342:
> 
>> 340:     while ((end < limit) && ((char)base[end] == JVM_SIGNATURE_ARRAY)) { end++; }
>> 341:     // If we discovered only the string of '[', this means something is wrong.
>> 342:     if (end >= limit) {
> 
> Nit: Is > ever possible?

@dholmes-ora, are you good with this explanation?

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

PR: https://git.openjdk.org/jdk/pull/9711


More information about the hotspot-runtime-dev mailing list