Skip to content

Commit

Permalink
8288759: GCC 12 fails to compile signature.cpp due to -Wstringop-over…
Browse files Browse the repository at this point in the history
…read

Reviewed-by: dholmes, coleenp
  • Loading branch information
shipilev committed Aug 30, 2022
1 parent f285cea commit 1576f99
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hotspot/share/runtime/signature.cpp
Expand Up @@ -338,6 +338,11 @@ inline int SignatureStream::scan_type(BasicType type) {

case T_ARRAY:
while ((end < limit) && ((char)base[end] == JVM_SIGNATURE_ARRAY)) { end++; }
// If we discovered only the string of '[', this means something is wrong.
if (end >= limit) {
assert(false, "Invalid type detected");
return limit;
}
_array_prefix = end - _end; // number of '[' chars just skipped
if (Signature::has_envelope(base[end])) {
tem = (const u1 *) memchr(&base[end], JVM_SIGNATURE_ENDCLASS, limit - end);
Expand Down

1 comment on commit 1576f99

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.