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

--- Comment #11 from Bernd Schmidt <bernds at gcc dot gnu.org> ---
Author: bernds
Date: Wed Feb 17 13:10:59 2016
New Revision: 233492

URL: https://gcc.gnu.org/viewcvs?rev=233492&root=gcc&view=rev
Log:
Backport use-after-free fix for PR69522.

c/
        PR c/69522
        * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
        callers changed.  If nested_p is true, use it to call
        finish_implicit_inits.
        * c-tree.h (finish_implicit_inits): Declare.
        * c-typeck.c (finish_implicit_inits): New function.  Move code
        from ...
        (push_init_level): ... here.
        (set_designator, process_init_element): Call finish_implicit_inits.

testsuite/
        PR c/69522
        gcc.dg/pr69522.c: New test.


Added:
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr69522.c
Modified:
    branches/gcc-5-branch/gcc/c/ChangeLog
    branches/gcc-5-branch/gcc/c/c-parser.c
    branches/gcc-5-branch/gcc/c/c-tree.h
    branches/gcc-5-branch/gcc/c/c-typeck.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog

Reply via email to