diff options
author | Pedro Alves <palves@redhat.com> | 2014-05-28 23:06:44 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2014-05-28 23:06:44 +0100 |
commit | 6143b8235e8d14685d8ab747cdd4f8faa94d1fe0 (patch) | |
tree | 786f0ffbf7a8d4a7cb1877c40ff519d51710fa35 /libiberty/ChangeLog | |
parent | 6e933ccc75f683a19dda3c92c6d9a35f857b98b3 (diff) | |
download | fsf-binutils-gdb-6143b8235e8d14685d8ab747cdd4f8faa94d1fe0.zip fsf-binutils-gdb-6143b8235e8d14685d8ab747cdd4f8faa94d1fe0.tar.gz fsf-binutils-gdb-6143b8235e8d14685d8ab747cdd4f8faa94d1fe0.tar.bz2 |
Fix demangler testsuite crashes with CP_DEMANGLE_DEBUG defined
Running the demangler's testsuite with CP_DEMANGLE_DEBUG defined
crashes, with:
Program received signal SIGSEGV, Segmentation fault.
0x000000000040a8c3 in d_dump (dc=0x1, indent=12) at ../../src/libiberty/cp-demangle.c:567
567 switch (dc->type)
(gdb) bt 3
#0 0x000000000040a8c3 in d_dump (dc=0x1, indent=12) at ../../src/libiberty/cp-demangle.c:567
#1 0x000000000040ae47 in d_dump (dc=0x7fffffffd098, indent=10) at ../../src/libiberty/cp-demangle.c:787
#2 0x000000000040ae47 in d_dump (dc=0x7fffffffd0c8, indent=8) at ../../src/libiberty/cp-demangle.c:787
Note dc=0x1, which is obviously a bogus pointer. This is the end of
d_dump recursing for a component type that that doesn't actually have
subtrees:
787 d_dump (d_left (dc), indent + 2);
788 d_dump (d_right (dc), indent + 2);
This fixes the two cases the testsuite currently trips on.
libiberty/
2014-05-28 Pedro Alves <palves@redhat.com>
* cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_FUNCTION_PARAM
and DEMANGLE_COMPONENT_NUMBER.
Diffstat (limited to 'libiberty/ChangeLog')
-rw-r--r-- | libiberty/ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 7b25c7e..16eb6f7 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2014-05-28 Pedro Alves <palves@redhat.com> + + * cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_FUNCTION_PARAM + and DEMANGLE_COMPONENT_NUMBER. + 2014-05-22 Thomas Schwinge <thomas@codesourcery.com> * testsuite/demangle-expected: Fix last commit. |