[Bug 260818] ctfconvert errors when processing iwlwifi object files

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 30 Dec 2021 15:06:07 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260818

            Bug ID: 260818
           Summary: ctfconvert errors when processing iwlwifi object files
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: markj@FreeBSD.org

$ cd sys/modules/iwlwifi
$ make -s WITH_CTF= DEBUG_FLAGS=-g
ctfconvert: failed to resolve the following types:                             
struct 65360 <ff50>: failed to size member "desc" of type  (65453 <ffad>)      
ERROR: ctfconvert: failed to resolve types                                     
ctfconvert: failed to resolve the following types:                             
struct 66979 <105a3>: failed to size member "desc" of type  (67072 <10600>)     
ERROR: ctfconvert: failed to resolve types                                     
ctfconvert: failed to resolve the following types:                              
struct 66556 <103fc>: failed to size member "desc" of type  (66649 <10459>)     
ERROR: ctfconvert: failed to resolve types                                      
ctfconvert: failed to resolve the following types:
...

Looks like all the warnings are about the "desc" field of struct
iwl_p2p_noa_attr, which is:

  struct ieee80211_p2p_noa_desc desc[IWL_P2P_NOA_DESC_COUNT];

and we have

  struct ieee80211_p2p_noa_desc {
        /* TODO FIXME */
  };

Adding a dummy field to the latter "fixes" the problem.

Looking at ctfconvert, empty structs and unions are permitted and handled, as
are flexible array members.  The problem is that here we have an array of empty
structs.  I think die_sou_resolve() needs some extra logic to handle this case.

-- 
You are receiving this mail because:
You are the assignee for the bug.