From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 06D4C385E454; Wed, 14 Apr 2021 10:53:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06D4C385E454 From: "maennich at android dot com" To: libabigail@sourceware.org Subject: [Bug default/27715] Fails to detect GObjectClass ABI changes Date: Wed, 14 Apr 2021 10:53:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: maennich at android dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dodji at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Wed, 14 Apr 2021 10:53:46 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27715 --- Comment #9 from Matthias Maennich --- Anything passed to the API via opaque pointers is essentially hidden from A= BI analysis as no type information (other than void*) is attached to it. From = an ABI point of view the ABI of the symbol that passes void* is unchanged. Tho= ugh further down this of course can become incompatible. There are cases that you intentionally want to pass void* to be ABI compati= ble even though the type changes. E.g. if your library has such an interface: void* get_handle(){ // allocates the resources and returns just a handle to it. ... return (void*) some_object; } void do_something(void* handle) { // uses the handle as a reference } The ABI is stable even though the type could have changed. The client code might not even know the concrete type and is also not supposed to cast to i= t. So, as much as I would also like to sometimes inspect underlying types of void*, flagging changes to those types is probably wrong. If you want this = type to be stable, you need to let it participate as a type in the interface. One way of achieving this is to define a symbol just for the sake of ABI analysis: void (struct _GTypeModuleClass obj) { } This will get picked up by libabigail and the type will participate in the analysis then. --=20 You are receiving this mail because: You are on the CC list for the bug.=