public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix PA buglet with sprintf formatting
@ 2016-10-26 15:25 Jeff Law
  0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2016-10-26 15:25 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 346 bytes --]



If we have enough thunks we could potentially overwrite the output 
buffer in pa_asm_output_mi_thunk:

       ASM_GENERATE_INTERNAL_LABEL (label, "LTHN", current_thunk_number);

In reality we're unlikely to get enough thunks to cause a problem, but 
fixing this is easy by just increasing the size of the buffer.

Installed on the trunk.

Jeff

[-- Attachment #2: P --]
[-- Type: text/plain, Size: 824 bytes --]

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c9b72bc..7d869b1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
 2016-10-26  Jeff Law  <law@redhat.com>
 
+	* config/pa/pa.c (pa_asm_output_mi_thunk): Increase buffer
+	size.
+
 	* config/h8300/h8300.c (h8300_print_operand): Adjust FALLTHRU
 	comment to silence warning.
 
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index e04abd4..c8ce083 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -8345,7 +8345,7 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
   static unsigned int current_thunk_number;
   int val_14 = VAL_14_BITS_P (delta);
   unsigned int old_last_address = last_address, nbytes = 0;
-  char label[16];
+  char label[17];
   rtx xoperands[4];
 
   xoperands[0] = XEXP (DECL_RTL (function), 0);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-26 15:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-26 15:25 Fix PA buglet with sprintf formatting Jeff Law

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).