digitalmars.D - gdb bugs/patches
- Brad Roberts (24/24) Aug 01 2010 Who was it that has the appropriate paperwork on file to get patches int...
- Robert Clipsham (10/34) Aug 01 2010 If I recall correctly all you need to do is send a message to the gdb
- Brad Roberts (5/19) Aug 01 2010 Ok.. re-sent to gdb-patches@sourceware.org.
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
Aug 01 2010
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, BradIf 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-cvswe -markup&cvsroot=src for details. [1] http://www.gnu.org/software/gdb/mailing-lists/#gdb-patches -- Robert http://octarineparrot.com/
Aug 01 2010
On 8/1/2010 3:49 AM, Robert Clipsham wrote:On 01/08/10 10:01, Brad Roberts wrote:<snip>Who was it that has the appropriate paperwork on file to get patches into gdb?Ok.. re-sent to gdb-patches sourceware.org. Thanks, BradThanks, BradIf 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
Aug 01 2010