This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/71696] Libiberty Demangler segfaults (6)


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71696

--- Comment #2 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Thu Aug  4 16:53:18 2016
New Revision: 239143

URL: https://gcc.gnu.org/viewcvs?rev=239143&root=gcc&view=rev
Log:
2016-08-04  Marcel Böhme  <boehme.marcel@gmail.com>

        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.

Modified:
    trunk/libiberty/ChangeLog
    trunk/libiberty/cplus-dem.c
    trunk/libiberty/testsuite/demangle-expected

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]