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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Sergei Trofimovich
<sly...@gcc.gnu.org>:

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

commit r10-8844-gb843d57c57ac92c9cd38eec7289da2f1ea696f18
Author: Sergei Trofimovich <siarh...@google.com>
Date:   Sun Sep 6 12:13:54 2020 +0100

    gcov: fix TOPN streaming from shared libraries

    Before the change gcc did not stream correctly TOPN counters
    if counters belonged to a non-local shared object.

    As a result zero-section optimization generated TOPN sections
    in a form not recognizable by '__gcov_merge_topn'.

    The problem happens because in a case of multiple shared objects
    '__gcov_merge_topn' function is present in address space multiple
    times (once per each object).

    The fix is to never rely on function address and predicate on TOPN
    counter types.

    libgcc/ChangeLog:

            PR gcov-profile/96913
            * libgcov-driver.c (write_one_data): Avoid function pointer
            comparison in TOP streaming decision.

    (cherry picked from commit 4ecf368f4b4223fb2df4f3887429dfbb48852e38)

Reply via email to