* [Bug default/26568] New: abidw lost anonymous member @ 2020-09-02 15:06 gprocida+abigail at google dot com 2020-09-02 15:44 ` [Bug default/26568] " gprocida+abigail at google dot com ` (6 more replies) 0 siblings, 7 replies; 8+ messages in thread From: gprocida+abigail at google dot com @ 2020-09-02 15:06 UTC (permalink / raw) To: libabigail https://sourceware.org/bugzilla/show_bug.cgi?id=26568 Bug ID: 26568 Summary: abidw lost anonymous member Product: libabigail Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: default Assignee: dodji at redhat dot com Reporter: gprocida+abigail at google dot com CC: libabigail at sourceware dot org Target Milestone: --- This is a fairly small C test case. I' struct A { union { struct { int x; }; struct { long y; }; }; }; void fun(struct A * a) { a->x = 0; a->y = 0x0102030405060708ULL; } Compiling with GCC 9.3.0 and extracting the ABI with abidw results in the loss of the member variable y (which dwarfdump confirms is present in the object file). Here's an even smaller test case: union A { struct { int x; }; struct { long y; }; }; void fun(union A * a) { a->x = 0; a->y = 0x0102030405060708ULL; } The very similar code below seems to be treated properly: struct A { union { int x; }; union { long y; }; }; void fun(struct A * a) { a->x = 0; a->y = 0x0102030405060708ULL; } -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug default/26568] abidw lost anonymous member 2020-09-02 15:06 [Bug default/26568] New: abidw lost anonymous member gprocida+abigail at google dot com @ 2020-09-02 15:44 ` gprocida+abigail at google dot com 2020-09-02 18:19 ` gprocida+abigail at google dot com ` (5 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: gprocida+abigail at google dot com @ 2020-09-02 15:44 UTC (permalink / raw) To: libabigail https://sourceware.org/bugzilla/show_bug.cgi?id=26568 --- Comment #1 from Giuliano Procida <gprocida+abigail at google dot com> --- The second anonymous member appears to be lost due this check in add_or_update_union_type in the DWARF reader. if (lookup_var_decl_in_scope(n, result)) continue; Here n is the empty string for both members. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug default/26568] abidw lost anonymous member 2020-09-02 15:06 [Bug default/26568] New: abidw lost anonymous member gprocida+abigail at google dot com 2020-09-02 15:44 ` [Bug default/26568] " gprocida+abigail at google dot com @ 2020-09-02 18:19 ` gprocida+abigail at google dot com 2020-09-02 18:51 ` gprocida+abigail at google dot com ` (4 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: gprocida+abigail at google dot com @ 2020-09-02 18:19 UTC (permalink / raw) To: libabigail https://sourceware.org/bugzilla/show_bug.cgi?id=26568 --- Comment #2 from Giuliano Procida <gprocida+abigail at google dot com> --- I have a rough fix at https://github.com/myxoid/libabigail/commits/anon-member-trouble. Next step is to see what difference it makes to kernel ABIs. It depends how often we have anonymous structs inside unions. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug default/26568] abidw lost anonymous member 2020-09-02 15:06 [Bug default/26568] New: abidw lost anonymous member gprocida+abigail at google dot com 2020-09-02 15:44 ` [Bug default/26568] " gprocida+abigail at google dot com 2020-09-02 18:19 ` gprocida+abigail at google dot com @ 2020-09-02 18:51 ` gprocida+abigail at google dot com 2020-09-15 11:51 ` dodji at redhat dot com ` (3 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: gprocida+abigail at google dot com @ 2020-09-02 18:51 UTC (permalink / raw) To: libabigail https://sourceware.org/bugzilla/show_bug.cgi?id=26568 --- Comment #3 from Giuliano Procida <gprocida+abigail at google dot com> --- W.r.t. kernel ABI: The rough fix causes member-type elements to move out of the relevant unions. It also results in a massive number of "harmless" diffs. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug default/26568] abidw lost anonymous member 2020-09-02 15:06 [Bug default/26568] New: abidw lost anonymous member gprocida+abigail at google dot com ` (2 preceding siblings ...) 2020-09-02 18:51 ` gprocida+abigail at google dot com @ 2020-09-15 11:51 ` dodji at redhat dot com 2020-09-16 15:52 ` [Bug default/26568] A union can't have more than one anonymous member and that's wrong dodji at redhat dot com ` (2 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: dodji at redhat dot com @ 2020-09-15 11:51 UTC (permalink / raw) To: libabigail https://sourceware.org/bugzilla/show_bug.cgi?id=26568 dodji at redhat dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2020-09-15 Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug default/26568] A union can't have more than one anonymous member and that's wrong 2020-09-02 15:06 [Bug default/26568] New: abidw lost anonymous member gprocida+abigail at google dot com ` (3 preceding siblings ...) 2020-09-15 11:51 ` dodji at redhat dot com @ 2020-09-16 15:52 ` dodji at redhat dot com 2020-09-17 13:39 ` dodji at redhat dot com 2020-09-18 14:48 ` dodji at redhat dot com 6 siblings, 0 replies; 8+ messages in thread From: dodji at redhat dot com @ 2020-09-16 15:52 UTC (permalink / raw) To: libabigail https://sourceware.org/bugzilla/show_bug.cgi?id=26568 dodji at redhat dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|abidw lost anonymous member |A union can't have more | |than one anonymous member | |and that's wrong -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug default/26568] A union can't have more than one anonymous member and that's wrong 2020-09-02 15:06 [Bug default/26568] New: abidw lost anonymous member gprocida+abigail at google dot com ` (4 preceding siblings ...) 2020-09-16 15:52 ` [Bug default/26568] A union can't have more than one anonymous member and that's wrong dodji at redhat dot com @ 2020-09-17 13:39 ` dodji at redhat dot com 2020-09-18 14:48 ` dodji at redhat dot com 6 siblings, 0 replies; 8+ messages in thread From: dodji at redhat dot com @ 2020-09-17 13:39 UTC (permalink / raw) To: libabigail https://sourceware.org/bugzilla/show_bug.cgi?id=26568 --- Comment #4 from dodji at redhat dot com --- A patch for this has been submitted at https://sourceware.org/pipermail/libabigail/2020q3/002668.html. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug default/26568] A union can't have more than one anonymous member and that's wrong 2020-09-02 15:06 [Bug default/26568] New: abidw lost anonymous member gprocida+abigail at google dot com ` (5 preceding siblings ...) 2020-09-17 13:39 ` dodji at redhat dot com @ 2020-09-18 14:48 ` dodji at redhat dot com 6 siblings, 0 replies; 8+ messages in thread From: dodji at redhat dot com @ 2020-09-18 14:48 UTC (permalink / raw) To: libabigail https://sourceware.org/bugzilla/show_bug.cgi?id=26568 dodji at redhat dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #5 from dodji at redhat dot com --- The patch was applied to the master branch at https://sourceware.org/git/?p=libabigail.git;a=commit;h=59610d5572bf8a997b0f490cae20d42f73acf3e1 and should be available in the 1.8 version of libabigail. Thanks for reporting the issue and sorry for the inconvenience. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-09-18 14:48 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-09-02 15:06 [Bug default/26568] New: abidw lost anonymous member gprocida+abigail at google dot com 2020-09-02 15:44 ` [Bug default/26568] " gprocida+abigail at google dot com 2020-09-02 18:19 ` gprocida+abigail at google dot com 2020-09-02 18:51 ` gprocida+abigail at google dot com 2020-09-15 11:51 ` dodji at redhat dot com 2020-09-16 15:52 ` [Bug default/26568] A union can't have more than one anonymous member and that's wrong dodji at redhat dot com 2020-09-17 13:39 ` dodji at redhat dot com 2020-09-18 14: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).