public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/31017] New: Flex array conversion suppression
@ 2023-10-31 18:34 quic_johmoo at quicinc dot com
  2023-11-03 20:58 ` [Bug default/31017] " dodji at redhat dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: quic_johmoo at quicinc dot com @ 2023-10-31 18:34 UTC (permalink / raw)
  To: libabigail

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

            Bug ID: 31017
           Summary: Flex array conversion suppression
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: quic_johmoo at quicinc dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

In the past, it was common in Linux kernel code to have a "fake flex array" at
the end of a structure. Like this:

struct foo {
         int x;
         int y;
         int end[1];
}; 

In recent years, with improved compiler support, real flex arrays have been
preferred. It's common to see patches like this:
https://github.com/torvalds/linux/commit/c6f2e6b6eaaf883df482cb94f302acad9b80a2a4

Basically, this takes the struct above, and changes it to:

struct foo {
         int x;
         int y;
         int end[];
}; 

abidiff flags this change with:

   [C] 'struct foo' changed:
     type size changed from 96 to 64 (in bits)
     1 data member change:
       type of 'int end[1]' changed:
         type name changed from 'int[1]' to 'int[]'
         array type size changed from 32 to 'unknown'
         array type subrange 1 changed length from 1 to 'unknown' 

It would be good to have a suppression to filter out this kind of change. For
example:

     [suppress_type]
       type_kind = struct
       has_size_change = true
       has_strict_flexible_array_data_member_conversion = true

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-11-15 11:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-31 18:34 [Bug default/31017] New: Flex array conversion suppression quic_johmoo at quicinc dot com
2023-11-03 20:58 ` [Bug default/31017] " dodji at redhat dot com
2023-11-04  0:49 ` quic_johmoo at quicinc dot com
2023-11-05  9:43   ` Dodji Seketeli
2023-11-06 17:47     ` John Moon
2023-11-13 13:28       ` Dodji Seketeli
2023-11-05  9:43 ` dodji at seketeli dot org
2023-11-06 17:48 ` quic_johmoo at quicinc dot com
2023-11-13 13:28 ` dodji at seketeli dot org
2023-11-15  4:58 ` quic_johmoo at quicinc dot com
2023-11-15 11:48 ` dodji at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).