public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/24787] New: One more ABI change to mark harmless
@ 2019-01-01  0:00 bochecha at daitauha dot fr
  2019-01-01  0:00 ` [Bug default/24787] " dodji at redhat dot com
  2019-01-01  0:00 ` dodji at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: bochecha at daitauha dot fr @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

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

            Bug ID: 24787
           Summary: One more ABI change to mark harmless
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: bochecha at daitauha dot fr
                CC: libabigail at sourceware dot org
  Target Milestone: ---

In a library I maintain, I have an enum used as bit flags for a function.

I had incorrectly defined it all as follows: (simplified example)

```
$ cat one.c
#include <stdio.h>


typedef enum FooFilter {
    FOO_FILTER_ONE   = 1 << 0,
    FOO_FILTER_TWO   = 1 << 1,
    FOO_FILTER_THREE = 1 << 2,
} FooFilter;


void do_something(FooFilter filter_flags) {
  printf("%d\n", filter_flags);
}
```

When I realized that defining the function argument this way was wrong, I
changed it as follows:

```
$ cat two.c 
#include <stdio.h>


typedef enum FooFilter {
    FOO_FILTER_ONE   = 1 << 0,
    FOO_FILTER_TWO   = 1 << 1,
    FOO_FILTER_THREE = 1 << 2,
} FooFilter;


void do_something(unsigned int filter_flags) {
  printf("%d\n", filter_flags);
}
```

Compiling these two:

```
$ gcc -o libone.so --shared -fPIC -g one.c
$ gcc -o libtwo.so --shared -fPIC -g two.c
```

Then using abidiff:

```
$ abidiff libone.so libtwo.so 
Functions changes summary: 0 Removed, 1 Changed, 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

1 function with some indirect sub-type change:

  [C]'function void do_something(FooFilter)' at two.c:11:1 has some indirect
sub-type changes:
    parameter 1 of type 'typedef FooFilter' changed:
      entity changed from 'typedef FooFilter' to 'unsigned int'
      type size hasn't changed
      type alignement changed from 32 to 0
```

Libabigail rightfully detects the ABI change. However, Dodji says it should be
marked as harmless as it's not a change which can break applications.

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

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

* [Bug default/24787] One more ABI change to mark harmless
  2019-01-01  0:00 [Bug default/24787] New: One more ABI change to mark harmless bochecha at daitauha dot fr
  2019-01-01  0:00 ` [Bug default/24787] " dodji at redhat dot com
@ 2019-01-01  0:00 ` dodji at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: dodji at redhat dot com @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

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

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2019-07-19
     Ever confirmed|0                           |1

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

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

* [Bug default/24787] One more ABI change to mark harmless
  2019-01-01  0:00 [Bug default/24787] New: One more ABI change to mark harmless bochecha at daitauha dot fr
@ 2019-01-01  0:00 ` dodji at redhat dot com
  2019-01-01  0:00 ` dodji at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: dodji at redhat dot com @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail

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

dodji at redhat dot com changed:

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

--- Comment #1 from dodji at redhat dot com ---
This should be fixed in the master branch of the Git repository by commit
https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commit;h=f2437aabad085e9f9c99d28e94ac0f046e224763.

Thank you for taking the time to file this issue.

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

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

end of thread, other threads:[~2019-07-19 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01  0:00 [Bug default/24787] New: One more ABI change to mark harmless bochecha at daitauha dot fr
2019-01-01  0:00 ` [Bug default/24787] " dodji at redhat dot com
2019-01-01  0:00 ` 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).