On 01/08/10 10:01, Brad Roberts wrote:
Who was it that has the appropriate paperwork on file to get patches into gdb?

I've got a small diff that fixes a critical problem with it's demangler:

diff --git a/gdb/d-lang.c b/gdb/d-lang.c
index 6db521b..f17431b 100644
--- a/gdb/d-lang.c
+++ b/gdb/d-lang.c
@@ -37,8 +37,9 @@ extract_identifiers (const char *mangled_str, struct obstack
*tempbuf)

    while (isdigit (*mangled_str))
      {
-      i = strtol (mangled_str, NULL, 10);
-      mangled_str++;
+      char * end_ptr;
+      i = strtol (mangled_str,&end_ptr, 10);
+      mangled_str = end_ptr;
        if (i<= 0&&  strlen (mangled_str)<  i)
          return 0;
        obstack_grow (tempbuf, mangled_str, i);

Before this change, symbols with strings over 9 bytes long gets into a bad state
and might end up crashing.  Certainly ends up with a bad string.

And example that crashes for me:
     20src/core/atomic.d.9215__unittest_failFiZv

Thanks,
Brad

If I recall correctly all you need to do is send a message to the gdb patches mailing list[1] - you shouldn't need to fill in copyright assignment forms for a small patch like this, see http://sourceware.org/cgi-bin/cvsweb.cgi/~checkout~/src/gdb/CONTRIBUTE?content-type=text/x-cvsweb-markup&cvsroot=src for details.

[1] http://www.gnu.org/software/gdb/mailing-lists/#gdb-patches

--
Robert
http://octarineparrot.com/

Reply via email to