[Bug default/28073] [libabigail] Incorrect size for bitfields

dodji at redhat dot com sourceware-bugzilla@sourceware.org
Mon Dec 6 13:54:07 GMT 2021


https://sourceware.org/bugzilla/show_bug.cgi?id=28073

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from dodji at redhat dot com ---
I think the correct suppression specification for this should be:

1/
[suppress_type]
        name = bigstruct
        has_data_member_inserted_between = {offset_of(bitfield0),
offset_of(other)}

Why?

because offset_after(bitfield0) means the offset of the data member that comes
after bitfiled0, in the initial version of the type.  In that version, the data
member that comes after the data member "bitfield0" is the data member "other".

So, {offset_after(bitfield0), offset_of(other)} is equivalent to:
{offset_of(other), offset_of(other)}.  And that is not what we want.

The code that evaluates the suppression specification, however, has a
tangentially related flaw:  If bitfield0 is later removed, the suppression
specification 1/ should not suppress that removal change.  That flaw is now
fixed by the commit
https://sourceware.org/git/?p=libabigail.git;a=commit;h=3e0eeb9f98216ecd1c3224f687fe1e1ef72b56e4
which also updates the documentation of to clarify the use of the
has_data_member_inserted_between property.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Libabigail mailing list