From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3OYqVYAgKCq4UdfcQWROUccUZS.QcaZWPOPWUOWZgcifQSkOfS.cfU@flex--gprocida.bounces.google.com> Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by sourceware.org (Postfix) with ESMTPS id 8319E3853829 for ; Fri, 7 May 2021 18:43:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8319E3853829 Received: by mail-qk1-x749.google.com with SMTP id v1-20020a05620a1221b02902ea88445e01so3722615qkj.9 for ; Fri, 07 May 2021 11:43:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=Sgjjo+V45qR/zUs/w9dXLCiBFCCcnqn3p36pWrbpklI=; b=XlJwt6T8n3/uTw66Lr2M7Ak2dTzKl78tQfnmapqsYCNcQtsmtwYyR6H5Wt+cpJMMFw AEtkruh3+8i20v9+SUFbhChnCAs77ZdqBMEgkBPwhFIjAyhZImXGq9lqrp6fcKmt8lk4 rOAj+LeE6r0K85IzEHg0cpgOD624+sIeFWW5NYZb4Cz0DEzEPTIs3pIP0MmwFQG1ZQq2 G1pCls3AZ55jLa0lZgMHOsBGwYTBjERorTRDuTZKmgZeOUtcUP+vkDWD2uJ07Q0hr7rs uhyASfsOaeVxKQOyS4/hvdXiIMaI9xhVYy3CU38qAafEYktCvwoNY2QIdNuD78LXRVTO la7g== X-Gm-Message-State: AOAM532VtSJEQzwJyF7Sx2WMOInuRh/Mlq0WoahIujnu2JVZ/x7vox9R 48k5pC+9Gn+A4fjv9s3lasfDRDFjmGrmsYljqnWVwCvjkDnxn5a9nih+VyYgJuZfxLiASwRGlHs vYBUEFeZwM//WVHm4VIptiaUujdVqu+5Y1FI7bcKRRvqt3xEcZPJIjBfv1HGazSLOIx8FpLQ= X-Google-Smtp-Source: ABdhPJzm+5Iwcdc561QTPvBbHuy3Xve0FPfnVUFiYTj0ikjvdX0PK9m9PgdYDiDrr+80K9OVEo9hu9FBxiVyLQ== X-Received: from tef.lon.corp.google.com ([2a00:79e0:d:210:e199:ad3e:6253:8fbc]) (user=gprocida job=sendgmr) by 2002:ad4:5aa1:: with SMTP id u1mr11138531qvg.23.1620412985980; Fri, 07 May 2021 11:43:05 -0700 (PDT) Date: Fri, 7 May 2021 19:42:50 +0100 In-Reply-To: <20210507184250.3946416-1-gprocida@google.com> Message-Id: <20210507184250.3946416-4-gprocida@google.com> Mime-Version: 1.0 References: <20210507184250.3946416-1-gprocida@google.com> X-Mailer: git-send-email 2.31.1.607.g51e8a6a459-goog Subject: [RFC PATCH 3/3] XML writer: emit enclosing types of scoped declarations From: Giuliano Procida To: libabigail@sourceware.org Cc: dodji@seketeli.org, kernel-team@android.com, gprocida@google.com, maennich@google.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-16.5 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2021 18:43:07 -0000 Bug 26591 - detect pathologically redundant types in abixml One source of duplicated type ids in ABI XML is the writer emitting scoped (nested) typed declarations before a later TU causes the emission of the complete enclosing type declaration. This commit causes the outermost enclosing type declaration to be emitted immediately. This also prevents the later duplicate emission of the type and any of its nested member types. * src/abg-writer.cc: (write_decl_in_scope): Emit the enclosing types of any nested type declaration. * tests/data/test-annotate/test15-pr18892.so.abi: Refresh. * tests/data/test-annotate/test17-pr19027.so.abi: Refresh. * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Refresh. * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Refresh. * tests/data/test-read-dwarf/test-libandroid.so.abi: Refresh. * tests/data/test-read-dwarf/test12-pr18844.so.abi: Refresh. * tests/data/test-read-dwarf/test15-pr18892.so.abi: Refresh. * tests/data/test-read-dwarf/test16-pr18904.so.abi: Refresh. * tests/data/test-read-dwarf/test17-pr19027.so.abi: Refresh. * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Refresh. * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Refresh. * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Refresh. * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Refresh. Signed-off-by: Giuliano Procida --- src/abg-writer.cc | 32 +- .../data/test-annotate/test15-pr18892.so.abi | 250 +- .../data/test-annotate/test17-pr19027.so.abi | 2494 ++- ...19-pr19023-libtcmalloc_and_profiler.so.abi | 8004 ++++---- ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 2235 +-- .../test-read-dwarf/test-libandroid.so.abi | 276 +- .../test-read-dwarf/test10-pr18818-gcc.so.abi | 5 - .../test-read-dwarf/test12-pr18844.so.abi | 1586 +- .../test-read-dwarf/test15-pr18892.so.abi | 189 +- .../test-read-dwarf/test16-pr18904.so.abi | 3860 ++-- .../test-read-dwarf/test17-pr19027.so.abi | 1557 +- ...19-pr19023-libtcmalloc_and_profiler.so.abi | 1955 +- ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 1844 +- .../test22-pr19097-libstdc++.so.6.0.17.so.abi | 15644 ++++++++-------- .../test9-pr18818-clang.so.abi | 12 - 15 files changed, 19556 insertions(+), 20387 deletions(-) Patch quite large, not posting here. See: https://github.com/myxoid/libabigail/commit/8fa8c3ae853cf2c1fabbc3795f5d7212bfd80619