* [PATCH]: Increase MAX_ARTIFICIAL_LABEL_BYTES to 40
@ 2017-08-23 16:35 Uros Bizjak
2017-08-23 16:59 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Uros Bizjak @ 2017-08-23 16:35 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Guenther
[-- Attachment #1: Type: text/plain, Size: 2826 bytes --]
Hello!
Recent changes caused bootstrap on alpha with:
/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c: In function ‘void
init_sections_and_labels(bool)’:
/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27181:1: error:
‘%ld’ directive writing between 1 and 10 bytes into a region of size 8
[-Werror=format-overflow=]
init_sections_and_labels (bool early_lto_debug)
^~~~~~~~~~~~~~~~~~~~~~~~
/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27181:1: note:
directive argument in the range [0, 4294967295]
In file included from ./tm.h:25:0,
from /space/homedirs/uros/gcc-svn/trunk/gcc/target.h:52,
from /space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:61:
/space/homedirs/uros/gcc-svn/trunk/gcc/config/alpha/alpha.h:958:11:
note: ‘sprintf’ output between 24 and 33 bytes into a destination of
size 30
sprintf ((LABEL), "*$%s%ld", (PREFIX), (long)(NUM))
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27207:4: note: in
expansion of macro ‘ASM_GENERATE_INTERNAL_LABEL’
ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_line_section_label,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27181:1: error:
‘%ld’ directive writing between 1 and 10 bytes into a region of size 6
[-Werror=format-overflow=]
init_sections_and_labels (bool early_lto_debug)
^~~~~~~~~~~~~~~~~~~~~~~~
/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27181:1: note:
directive argument in the range [0, 4294967295]
In file included from ./tm.h:25:0,
from /space/homedirs/uros/gcc-svn/trunk/gcc/target.h:52,
from /space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:61:
/space/homedirs/uros/gcc-svn/trunk/gcc/config/alpha/alpha.h:958:11:
note: ‘sprintf’ output between 26 and 35 bytes into a destination of
size 30
sprintf ((LABEL), "*$%s%ld", (PREFIX), (long)(NUM))
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27226:4: note: in
expansion of macro ‘ASM_GENERATE_INTERNAL_LABEL’
ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_abbrev_section_label,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
These new debug_skeleton_* section names are quite long, and together
with numerical value they don't fit anymore into the array with
MAX_ARTIFICIAL_LABEL_BYTES size.
The solution is to increase MAX_ARTIFICIAL_LABEL_BYTES value from 30 to 40.
The patch also removes unneeded definition from dwarf2cfi.c
2017-08-23 Uros Bizjak <ubizjak@gmail.com>
* dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
* dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.
Patch restores bootstrap on alphaev68-linux-gnu.
OK for mainline?
Uros.
[-- Attachment #2: a.diff.txt --]
[-- Type: text/plain, Size: 1001 bytes --]
Index: dwarf2cfi.c
===================================================================
--- dwarf2cfi.c (revision 251310)
+++ dwarf2cfi.c (working copy)
@@ -52,9 +52,6 @@
#ifndef INCOMING_RETURN_ADDR_RTX
#define INCOMING_RETURN_ADDR_RTX (gcc_unreachable (), NULL_RTX)
#endif
-
-/* Maximum size (in bytes) of an artificially generated label. */
-#define MAX_ARTIFICIAL_LABEL_BYTES 30
\f
/* A collected description of an entire row of the abstract CFI table. */
struct GTY(()) dw_cfi_row
Index: dwarf2out.c
===================================================================
--- dwarf2out.c (revision 251310)
+++ dwarf2out.c (working copy)
@@ -178,7 +178,7 @@
static GTY(()) section *debug_frame_section;
/* Maximum size (in bytes) of an artificially generated label. */
-#define MAX_ARTIFICIAL_LABEL_BYTES 30
+#define MAX_ARTIFICIAL_LABEL_BYTES 40
/* According to the (draft) DWARF 3 specification, the initial length
should either be 4 or 12 bytes. When it's 12 bytes, the first 4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH]: Increase MAX_ARTIFICIAL_LABEL_BYTES to 40
2017-08-23 16:35 [PATCH]: Increase MAX_ARTIFICIAL_LABEL_BYTES to 40 Uros Bizjak
@ 2017-08-23 16:59 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2017-08-23 16:59 UTC (permalink / raw)
To: gcc-patches, Uros Bizjak, gcc-patches; +Cc: Richard Guenther
On August 23, 2017 5:49:56 PM GMT+02:00, Uros Bizjak <ubizjak@gmail.com> wrote:
>Hello!
>
>Recent changes caused bootstrap on alpha with:
>
>/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c: In function ‘void
>init_sections_and_labels(bool)’:
>/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27181:1: error:
>‘%ld’ directive writing between 1 and 10 bytes into a region of size 8
>[-Werror=format-overflow=]
> init_sections_and_labels (bool early_lto_debug)
> ^~~~~~~~~~~~~~~~~~~~~~~~
>/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27181:1: note:
>directive argument in the range [0, 4294967295]
>In file included from ./tm.h:25:0,
> from /space/homedirs/uros/gcc-svn/trunk/gcc/target.h:52,
> from /space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:61:
>/space/homedirs/uros/gcc-svn/trunk/gcc/config/alpha/alpha.h:958:11:
>note: ‘sprintf’ output between 24 and 33 bytes into a destination of
>size 30
> sprintf ((LABEL), "*$%s%ld", (PREFIX), (long)(NUM))
> ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27207:4: note: in
>expansion of macro ‘ASM_GENERATE_INTERNAL_LABEL’
> ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_line_section_label,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27181:1: error:
>‘%ld’ directive writing between 1 and 10 bytes into a region of size 6
>[-Werror=format-overflow=]
> init_sections_and_labels (bool early_lto_debug)
> ^~~~~~~~~~~~~~~~~~~~~~~~
>/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27181:1: note:
>directive argument in the range [0, 4294967295]
>In file included from ./tm.h:25:0,
> from /space/homedirs/uros/gcc-svn/trunk/gcc/target.h:52,
> from /space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:61:
>/space/homedirs/uros/gcc-svn/trunk/gcc/config/alpha/alpha.h:958:11:
>note: ‘sprintf’ output between 26 and 35 bytes into a destination of
>size 30
> sprintf ((LABEL), "*$%s%ld", (PREFIX), (long)(NUM))
> ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>/space/homedirs/uros/gcc-svn/trunk/gcc/dwarf2out.c:27226:4: note: in
>expansion of macro ‘ASM_GENERATE_INTERNAL_LABEL’
> ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_abbrev_section_label,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>These new debug_skeleton_* section names are quite long, and together
>with numerical value they don't fit anymore into the array with
>MAX_ARTIFICIAL_LABEL_BYTES size.
>
>The solution is to increase MAX_ARTIFICIAL_LABEL_BYTES value from 30 to
>40.
>
>The patch also removes unneeded definition from dwarf2cfi.c
>
>2017-08-23 Uros Bizjak <ubizjak@gmail.com>
>
> * dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
> * dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.
>
>Patch restores bootstrap on alphaev68-linux-gnu.
>
>OK for mainline?
OK.
Richard.
>Uros.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-23 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 16:35 [PATCH]: Increase MAX_ARTIFICIAL_LABEL_BYTES to 40 Uros Bizjak
2017-08-23 16:59 ` Richard Biener
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).