public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/28613] New: error: array subscript 19 is outside array bounds of ‘void [136]’ [-Werror=array-bounds]
@ 2021-11-22  9:45 mliska at suse dot cz
  2021-11-22  9:48 ` [Bug build/28613] " mliska at suse dot cz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mliska at suse dot cz @ 2021-11-22  9:45 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28613

            Bug ID: 28613
           Summary: error: array subscript 19 is outside array bounds of
                    ‘void [136]’ [-Werror=array-bounds]
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: mliska at suse dot cz
  Target Milestone: ---

I noticed the current GCC master (12) emits the following werror:

g++ -x c++    -I. -I../../gdb -I../../gdb/config
-DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I../../gdb/../include/opcode -I../../gdb/../readline/readline/..
-I../../gdb/../zlib -I../bfd -I../../gdb/../bfd -I../../gdb/../include
-I../libdecnumber -I../../gdb/../libdecnumber  -I../../gdb/../gnulib/import
-I../gnulib/import -I../../gdb/.. -I.. -I../../gdb/../libbacktrace/
-I../libbacktrace/  -DTUI=1   -I/usr/include/guile/3.0 -I/usr   -I../../gdb/..
-pthread  -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-variable
-Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body
-Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare
-Wno-error=maybe-uninitialized -Wno-mismatched-tags -Wsuggest-override
-Wimplicit-fallthrough=3 -Wduplicated-cond -Wshadow=local -Wdeprecated-copy
-Wdeprecated-copy-dtor -Wredundant-move -Wmissing-declarations
-Wstrict-null-sentinel -Wformat -Wformat-nonliteral -Werror -g -O2     -c -o
language.o -MT language.o -MMD -MP -MF ./.deps/language.Tpo
../../gdb/language.c
In file included from /home/marxin/bin/gcc/include/c++/12.0.0/functional:64,
                 from ../../gdb/../gdbsupport/ptid.h:35,
                 from ../../gdb/../gdbsupport/common-defs.h:198,
                 from ../../gdb/defs.h:28,
                 from ../../gdb/language.c:31:
In function ‘void std::__final_insertion_sort(_RandomAccessIterator,
_RandomAccessIterator, _Compare) [with _RandomAccessIterator = const char**;
_Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(const char*, const
char*)>]’,
    inlined from ‘void std::__sort(_RandomAccessIterator,
_RandomAccessIterator, _Compare) [with _RandomAccessIterator = const char**;
_Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(const char*, const
char*)>]’ at /home/marxin/bin/gcc/include/c++/12.0.0/bits/stl_algo.h:1940:31,
    inlined from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter =
const char**; _Compare = bool (*)(const char*, const char*)]’ at
/home/marxin/bin/gcc/include/c++/12.0.0/bits/stl_algo.h:4853:18,
    inlined from ‘void add_set_language_command()’ at
../../gdb/language.c:492:13,
    inlined from ‘void _initialize_language()’ at ../../gdb/language.c:1175:28:
/home/marxin/bin/gcc/include/c++/12.0.0/bits/stl_algo.h:1849:32: error: array
subscript 19 is outside array bounds of ‘void [136]’ [-Werror=array-bounds]
 1849 |           std::__insertion_sort(__first, __first + int(_S_threshold),
__comp);
      |          
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘void add_set_language_command()’,
    inlined from ‘void _initialize_language()’ at ../../gdb/language.c:1175:28:
../../gdb/language.c:474:78: note: at offset 152 into object of size 136
allocated by ‘operator new []’
  474 |   language_names = new const char *[ARRAY_SIZE
(language_defn::languages) + 2];
      |                                                                        
     ^
cc1plus: all warnings being treated as errors
make: *** [Makefile:1655: language.o] Error 1
make: Target 'all' not remade because of errors.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug build/28613] error: array subscript 19 is outside array bounds of ‘void [136]’ [-Werror=array-bounds]
  2021-11-22  9:45 [Bug build/28613] New: error: array subscript 19 is outside array bounds of ‘void [136]’ [-Werror=array-bounds] mliska at suse dot cz
@ 2021-11-22  9:48 ` mliska at suse dot cz
  2021-11-22 16:15 ` msebor at gmail dot com
  2021-11-23  8:43 ` mliska at suse dot cz
  2 siblings, 0 replies; 4+ messages in thread
From: mliska at suse dot cz @ 2021-11-22  9:48 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28613

Martin Liska <mliska at suse dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at redhat dot com

--- Comment #1 from Martin Liska <mliska at suse dot cz> ---
Started with GCC
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=a110855667782dac7b674d3e328b253b3b3c919b

@Martin: Can you verify it's a real issue?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug build/28613] error: array subscript 19 is outside array bounds of ‘void [136]’ [-Werror=array-bounds]
  2021-11-22  9:45 [Bug build/28613] New: error: array subscript 19 is outside array bounds of ‘void [136]’ [-Werror=array-bounds] mliska at suse dot cz
  2021-11-22  9:48 ` [Bug build/28613] " mliska at suse dot cz
@ 2021-11-22 16:15 ` msebor at gmail dot com
  2021-11-23  8:43 ` mliska at suse dot cz
  2 siblings, 0 replies; 4+ messages in thread
From: msebor at gmail dot com @ 2021-11-22 16:15 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28613

Martin Sebor <msebor at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gmail dot com

--- Comment #2 from Martin Sebor <msebor at gmail dot com> ---
I don';t see the warning in my build log.  My latest Binutils/GDB build
(today's top of trunk with today's GCC)  shows the warnings below.  Because of
their large number I usually just check for obvious regressions.

Diagnostic                        Count   Unique    Files
-Wimplicit-function-declaration      88       62       10
-Wmaybe-uninitialized                43       37       23
-Wincompatible-pointer-types         42       42        1
-Wmissing-prototypes                 25       25        5
-Wpointer-to-int-cast                10       10        1
-Wint-to-pointer-cast                 9        9        1
-Walloc-zero                          8        3        3
-Wconflicts-sr                        5        5        5
-Wpointer-sign                        4        4        2
-Wstrict-aliasing                     3        3        1
-Wconflicts-rr                        1        1        1

(If you see a warning that you believe is a false positive that's not tracked
in GCC Bugzilla yet please submit a bug there with the usual details.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug build/28613] error: array subscript 19 is outside array bounds of ‘void [136]’ [-Werror=array-bounds]
  2021-11-22  9:45 [Bug build/28613] New: error: array subscript 19 is outside array bounds of ‘void [136]’ [-Werror=array-bounds] mliska at suse dot cz
  2021-11-22  9:48 ` [Bug build/28613] " mliska at suse dot cz
  2021-11-22 16:15 ` msebor at gmail dot com
@ 2021-11-23  8:43 ` mliska at suse dot cz
  2 siblings, 0 replies; 4+ messages in thread
From: mliska at suse dot cz @ 2021-11-23  8:43 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28613

Martin Liska <mliska at suse dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |MOVED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #3 from Martin Liska <mliska at suse dot cz> ---
Moved here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103377

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-23  8:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22  9:45 [Bug build/28613] New: error: array subscript 19 is outside array bounds of ‘void [136]’ [-Werror=array-bounds] mliska at suse dot cz
2021-11-22  9:48 ` [Bug build/28613] " mliska at suse dot cz
2021-11-22 16:15 ` msebor at gmail dot com
2021-11-23  8:43 ` mliska at suse dot cz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).