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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Jambor <jamb...@gcc.gnu.org>:

https://gcc.gnu.org/g:b3f60112edcb85b459e60f66c44a55138b1cef49

commit r12-5630-gb3f60112edcb85b459e60f66c44a55138b1cef49
Author: Martin Jambor <mjam...@suse.cz>
Date:   Tue Nov 30 15:35:18 2021 +0100

    ipa-param-manip: Be careful about a reallocating hash_map

    PR 103449 revealed that when I was storing result of one hash_map
    lookup into another entry in the hash_map, I was still accessing the
    entry in the table, which meanwhile could get reallocated, making the
    accesses invalid-after-free.

    Fixed with the following, which also simplifies the return statement
    which must have been true even now.

    gcc/ChangeLog:

    2021-11-29  Martin Liska  <mli...@suse.cz>
                Martin Jambor  <mjam...@suse.cz>

            PR ipa/103449
            * ipa-param-manipulation.c
            (ipa_param_body_adjustments::prepare_debug_expressions): Be
            careful about hash_map reallocating itself.  Simpify a return
            which always returns true.

Reply via email to