public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo commit in src/patchsets/gdb/7.2: 05_all_readline-headers.patch 80_all_gdb-6.5-dwarf-stack-overflow.patch README.history
@ 2010-09-11 16:47 Mike Frysinger (vapier)
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2010-09-11 16:47 UTC (permalink / raw
  To: gentoo-commits

vapier      10/09/11 16:47:38

  Added:                05_all_readline-headers.patch
                        80_all_gdb-6.5-dwarf-stack-overflow.patch
                        README.history
  Log:
  initial 7.2 patchset based on last 7.1 patchset

Revision  Changes    Path
1.1                  src/patchsets/gdb/7.2/05_all_readline-headers.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gdb/7.2/05_all_readline-headers.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gdb/7.2/05_all_readline-headers.patch?rev=1.1&content-type=text/plain

Index: 05_all_readline-headers.patch
===================================================================
--- a/readline/complete.c
+++ b/readline/complete.c
@@ -25,6 +25,11 @@
 #  include <config.h>
 #endif
 
+#ifdef HAVE_WCHAR_H /* wcwidth() */
+# define _GNU_SOURCE
+# include <wchar.h>
+#endif
+
 #include <sys/types.h>
 #include <fcntl.h>
 #if defined (HAVE_SYS_FILE_H)
--- a/readline/display.c
+++ b/readline/display.c
@@ -25,6 +25,11 @@
 #  include <config.h>
 #endif
 
+#ifdef HAVE_WCHAR_H /* wcwidth() */
+# define _GNU_SOURCE
+# include <wchar.h>
+#endif
+
 #include <sys/types.h>
 
 #if defined (HAVE_UNISTD_H)
--- a/readline/mbutil.c
+++ b/readline/mbutil.c
@@ -25,6 +25,11 @@
 #  include <config.h>
 #endif
 
+#ifdef HAVE_WCHAR_H /* wcwidth() */
+# define _GNU_SOURCE
+# include <wchar.h>
+#endif
+
 #include <sys/types.h>
 #include <fcntl.h>
 #include "posixjmp.h"



1.1                  src/patchsets/gdb/7.2/80_all_gdb-6.5-dwarf-stack-overflow.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gdb/7.2/80_all_gdb-6.5-dwarf-stack-overflow.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gdb/7.2/80_all_gdb-6.5-dwarf-stack-overflow.patch?rev=1.1&content-type=text/plain

Index: 80_all_gdb-6.5-dwarf-stack-overflow.patch
===================================================================
http://bugs.gentoo.org/144833

for gdb/ChangeLog:
2006-08-22  Will Drewry <wad@google.com>
	    Tavis Ormandy <taviso@google.com>

	* dwarf2read.c (decode_locdesc): Enforce location description stack
	boundaries.
	* dwarfread.c (locval): Likewise.

2007-10-15  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Port to GDB-6.7.

Index: gdb-6.7/gdb/dwarf2read.c
===================================================================
--- gdb-6.7.orig/gdb/dwarf2read.c	2007-10-15 00:08:30.000000000 +0200
+++ gdb-6.7/gdb/dwarf2read.c	2007-10-15 21:42:43.000000000 +0200
@@ -9070,8 +9070,7 @@ dwarf2_fundamental_type (struct objfile 
    callers will only want a very basic result and this can become a
    complaint.
 
-   Note that stack[0] is unused except as a default error return.
-   Note that stack overflow is not yet handled.  */
+   Note that stack[0] is unused except as a default error return. */
 
 static CORE_ADDR
 decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
@@ -9088,7 +9087,7 @@ decode_locdesc (struct dwarf_block *blk,
 
   i = 0;
   stacki = 0;
-  stack[stacki] = 0;
+  stack[++stacki] = 0;
 
   while (i < size)
     {
@@ -9270,6 +9269,16 @@ decode_locdesc (struct dwarf_block *blk,
 		     dwarf_stack_op_name (op));
 	  return (stack[stacki]);
 	}
+      /* Enforce maximum stack depth of size-1 to avoid ++stacki writing
+         outside of the allocated space. Also enforce minimum > 0.
+         -- wad@google.com 14 Aug 2006 */
+      if (stacki >= sizeof (stack) / sizeof (*stack) - 1)
+	internal_error (__FILE__, __LINE__,
+	                _("location description stack too deep: %d"),
+	                stacki);
+      if (stacki <= 0)
+	internal_error (__FILE__, __LINE__,
+	                _("location description stack too shallow"));
     }
   return (stack[stacki]);
 }



1.1                  src/patchsets/gdb/7.2/README.history

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gdb/7.2/README.history?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gdb/7.2/README.history?rev=1.1&content-type=text/plain

Index: README.history
===================================================================
1		11 Sep 2010
	+ 05_all_readline-headers.patch
	+ 80_all_gdb-6.5-dwarf-stack-overflow.patch






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

only message in thread, other threads:[~2010-09-11 16:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-11 16:47 [gentoo-commits] gentoo commit in src/patchsets/gdb/7.2: 05_all_readline-headers.patch 80_all_gdb-6.5-dwarf-stack-overflow.patch README.history Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox