This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 01/10] PR c++/71696 testcase.
- From: Mark Wielaard <mark at klomp dot org>
- To: binutils at sourceware dot org
- Cc: Marcel Böhme <boehme dot marcel at gmail dot com>
- Date: Thu, 17 Nov 2016 01:42:00 +0100
- Subject: [PATCH 01/10] PR c++/71696 testcase.
- Authentication-results: sourceware.org; auth=none
- References: <1479343329-16165-1-git-send-email-mark@klomp.org>
From: Marcel Böhme <boehme.marcel@gmail.com>
Add libiberty/testsuite/demangle-expected testcase for:
PR c++/71696
* cplus-dem.c: Prevent infinite recursion when there is a cycle
in the referencing of remembered mangled types.
(work_stuff): New stack to keep track of the remembered mangled
types that are currently being processed.
(push_processed_type): New method to push currently processed
remembered type onto the stack.
(pop_processed_type): New method to pop currently processed
remembered type from the stack.
(work_stuff_copy_to_from): Copy values of new variables.
(delete_non_B_K_work_stuff): Free stack memory.
(demangle_args): Push/Pop currently processed remembered type.
(do_type): Do not demangle a cyclic reference and push/pop
referenced remembered type.
---
libiberty/testsuite/demangle-expected | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
index 535f2c1..a5a658a 100644
--- a/libiberty/testsuite/demangle-expected
+++ b/libiberty/testsuite/demangle-expected
@@ -4587,3 +4587,8 @@ _Z80800000000000000000000
__t2m05B500000000000000000_
__t2m05B500000000000000000_
+#
+# Tests stack overflow PR71696
+
+__10%0__S4_0T0T0
+%0<>::%0(%0<>)
--
1.8.3.1