public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/21058] abipkgdiff dropping types not defined in devel packages by default leads to wrong reports
  2017-01-01  0:00 [Bug default/21058] New: Inaccurate abipkgdiff report cfergeau at redhat dot com
@ 2017-01-01  0:00 ` dodji at redhat dot com
  2017-01-01  0:00 ` [Bug default/21058] Inaccurate abipkgdiff report dodji at redhat dot com
  2017-01-01  0:00 ` [Bug default/21058] abipkgdiff dropping types not defined in devel packages by default leads to wrong reports dodji at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: dodji at redhat dot com @ 2017-01-01  0:00 UTC (permalink / raw)
  To: libabigail

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

dodji at redhat dot com changed:

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

--- Comment #2 from dodji at redhat dot com ---
This issue 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=8ae81a8e1620eea4c1a4f48c0ff53ae1184048c3.

The output that is now emitted when invoking abipkgdiff is:

dodji@adjoa:spice$ time abipkgdiff --d1
./spice-debuginfo-0.12.4-19.el7.x86_64.rpm --d2
./spice-debuginfo-0.12.8-1.el7.x86_64.rpm --devel1
./spice-server-devel-0.12.4-19.el7.x86_64.rpm --devel2
./spice-server-devel-0.12.8-1.el7.x86_64.rpm
./spice-server-0.12.4-19.el7.x86_64.rpm ./spice-server-0.12.8-1.el7.x86_64.rpm
================ changes of 'libspice-server.so.1.8.0'===============
  Functions changes summary: 1 Removed, 1 Changed (63 filtered out), 8 Added
functions
  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

  1 Removed function:

    'function int spice_server_migrate_client_state(SpiceServer*)'   
{spice_server_migrate_client_state@@SPICE_SERVER_0.6.0}

  8 Added functions:

    'function void spice_replay_free(SpiceReplay*)'   
{spice_replay_free@@SPICE_SERVER_0.12.6}
    'function void spice_replay_free_cmd(SpiceReplay*, QXLCommandExt*)'   
{spice_replay_free_cmd@@SPICE_SERVER_0.12.6}
    'function SpiceReplay* spice_replay_new(FILE*, int)'   
{spice_replay_new@@SPICE_SERVER_0.12.6}
    'function QXLCommandExt* spice_replay_next_cmd(SpiceReplay*, QXLWorker*)'  
 {spice_replay_next_cmd@@SPICE_SERVER_0.12.6}
    'function uint32_t
spice_server_get_best_playback_rate(SpicePlaybackInstance*)'   
{spice_server_get_best_playback_rate@@SPICE_SERVER_0.12.5}
    'function uint32_t spice_server_get_best_record_rate(SpiceRecordInstance*)'
   {spice_server_get_best_record_rate@@SPICE_SERVER_0.12.5}
    'function void spice_server_set_playback_rate(SpicePlaybackInstance*,
uint32_t)'    {spice_server_set_playback_rate@@SPICE_SERVER_0.12.5}
    'function void spice_server_set_record_rate(SpiceRecordInstance*,
uint32_t)'    {spice_server_set_record_rate@@SPICE_SERVER_0.12.5}

  1 function with some indirect sub-type change:

    [C]'function spice_image_compression_t
spice_server_get_image_compression(SpiceServer*)' at reds.c:3618:1 has some
indirect sub-type changes:
      return type changed:
        underlying type 'enum __anonymous_enum__' changed:
          type size hasn't changed
          7 enumerator deletions:
            '__anonymous_enum__::SPICE_IMAGE_COMPRESS_INVALID' value '0'
            '__anonymous_enum__::SPICE_IMAGE_COMPRESS_OFF' value '1'
            '__anonymous_enum__::SPICE_IMAGE_COMPRESS_AUTO_GLZ' value '2'
            '__anonymous_enum__::SPICE_IMAGE_COMPRESS_AUTO_LZ' value '3'
            '__anonymous_enum__::SPICE_IMAGE_COMPRESS_QUIC' value '4'
            '__anonymous_enum__::SPICE_IMAGE_COMPRESS_GLZ' value '5'
            '__anonymous_enum__::SPICE_IMAGE_COMPRESS_LZ' value '6'

          9 enumerator insertions:
            'SpiceImageCompression::SPICE_IMAGE_COMPRESSION_INVALID' value '0'
            'SpiceImageCompression::SPICE_IMAGE_COMPRESSION_OFF' value '1'
            'SpiceImageCompression::SPICE_IMAGE_COMPRESSION_AUTO_GLZ' value '2'
            'SpiceImageCompression::SPICE_IMAGE_COMPRESSION_AUTO_LZ' value '3'
            'SpiceImageCompression::SPICE_IMAGE_COMPRESSION_QUIC' value '4'
            'SpiceImageCompression::SPICE_IMAGE_COMPRESSION_GLZ' value '5'
            'SpiceImageCompression::SPICE_IMAGE_COMPRESSION_LZ' value '6'
            'SpiceImageCompression::SPICE_IMAGE_COMPRESSION_LZ4' value '7'
            'SpiceImageCompression::SPICE_IMAGE_COMPRESSION_ENUM_END' value '8'




================ end of changes of 'libspice-server.so.1.8.0'===============


real    0m1.384s
user    0m2.593s
sys     0m0.333s
dodji@adjoa:spice$ 

Thank you for filing this issue!

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

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

* [Bug default/21058] Inaccurate abipkgdiff report
  2017-01-01  0:00 [Bug default/21058] New: Inaccurate abipkgdiff report cfergeau at redhat dot com
  2017-01-01  0:00 ` [Bug default/21058] abipkgdiff dropping types not defined in devel packages by default leads to wrong reports dodji at redhat dot com
@ 2017-01-01  0:00 ` dodji at redhat dot com
  2017-01-01  0:00 ` [Bug default/21058] abipkgdiff dropping types not defined in devel packages by default leads to wrong reports dodji at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: dodji at redhat dot com @ 2017-01-01  0:00 UTC (permalink / raw)
  To: libabigail

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

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

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

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

* [Bug default/21058] abipkgdiff dropping types not defined in devel packages by default leads to wrong reports
  2017-01-01  0:00 [Bug default/21058] New: Inaccurate abipkgdiff report cfergeau at redhat dot com
  2017-01-01  0:00 ` [Bug default/21058] abipkgdiff dropping types not defined in devel packages by default leads to wrong reports dodji at redhat dot com
  2017-01-01  0:00 ` [Bug default/21058] Inaccurate abipkgdiff report dodji at redhat dot com
@ 2017-01-01  0:00 ` dodji at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: dodji at redhat dot com @ 2017-01-01  0:00 UTC (permalink / raw)
  To: libabigail

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

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Inaccurate abipkgdiff       |abipkgdiff dropping types
                   |report                      |not defined in devel
                   |                            |packages by default leads
                   |                            |to wrong reports

--- Comment #1 from dodji at redhat dot com ---
I can confirm the issue.

Thank you for taking time to file this report.

The reason why the SpiceServer* type is not shown is because it has been
dropped from the internal model of libabigail.  This is triggered by the
--devel1/--devel2 option which tells the library to drop any type that is *NOT*
defined in the header files that are in the -devel packages provided.

Note that in spice.h, SpiceServer is defined as
"typedef·struct·RedsState·SpiceServer;"  And struct RedsState itself is defined
nowhere (as far as I can tell) in any of the header files that are in the devel
package.  So struct RedsState is dropped from the internal model of libabigail
when it analyzes the libspice-server.so library.

Similarly, the reason why the SpiceImageCompression type is not shown (in the
second version of libspice-server.so) is that that enum is not defined in any
of the -devel package given.  As you said it's defined in a header file that
provided by a different package altogether.  As a result of the
--devel1/--devel2 options, that type is also dropped from the internal model.

We drop types not defined in the headers (provided by the devel package) of a
given library, not only to avoid showing changes in types that are not part of
the official interface of the package, but also to help decrease libabigail's
memory consumption.

This present case seems to argue against dropping types not defined in devel
packages, at lease by default.

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

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

* [Bug default/21058] New: Inaccurate abipkgdiff report
@ 2017-01-01  0:00 cfergeau at redhat dot com
  2017-01-01  0:00 ` [Bug default/21058] abipkgdiff dropping types not defined in devel packages by default leads to wrong reports dodji at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: cfergeau at redhat dot com @ 2017-01-01  0:00 UTC (permalink / raw)
  To: libabigail

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

            Bug ID: 21058
           Summary: Inaccurate abipkgdiff report
           Product: libabigail
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: cfergeau at redhat dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

I tried to compare
https://koji.fedoraproject.org/koji/buildinfo?buildID=673437
and
https://koji.fedoraproject.org/koji/buildinfo?buildID=689970
using
$ abipkgdiff --d1 ./spice-debuginfo-0.12.5-9.fc24.x86_64.rpm --d2
./spice-debuginfo-0.12.6-1.fc24.x86_64.rpm --devel1
./spice-server-devel-0.12.5-9.fc24.x86_64.rpm --devel2
./spice-server-devel-0.12.6-1.fc24.x86_64.rpm
./spice-server-0.12.5-9.fc24.x86_64.rpm 
./spice-server-0.12.6-1.fc24.x86_64.rpm

(libabigail-1.0-0.8.rc6.4.fc25.x86_64)

The result is

2 functions with some indirect sub-type change:

    [C]'function spice_image_compression_t
spice_server_get_image_compression()' at reds.c:3578:1 has some indirect
sub-type changes:
      return type changed:
        entity changed from 'typedef spice_image_compression_t' to 'void'
        type size changed from 32 to 0 bits
        type alignment changed from 32 to 0 bits

    [C]'function int
spice_server_set_image_compression(spice_image_compression_t)' at reds.c:3562:1
has some indirect sub-type changes:
      parameter 1 of type 'typedef spice_image_compression_t' was removed


The corresponding headers are:
in 0.12.5:

typedef enum {
    SPICE_IMAGE_COMPRESS_INVALID  = 0,
    SPICE_IMAGE_COMPRESS_OFF      = 1,
    SPICE_IMAGE_COMPRESS_AUTO_GLZ = 2,
    SPICE_IMAGE_COMPRESS_AUTO_LZ  = 3,
    SPICE_IMAGE_COMPRESS_QUIC     = 4,
    SPICE_IMAGE_COMPRESS_GLZ      = 5,
    SPICE_IMAGE_COMPRESS_LZ       = 6,
} spice_image_compression_t;

int spice_server_set_image_compression(SpiceServer *s,
                                       spice_image_compression_t comp);
spice_image_compression_t spice_server_get_image_compression(SpiceServer *s);




in 0.12.6:

// Needed for backward API compatibility
typedef SpiceImageCompression spice_image_compression_t;
#define SPICE_IMAGE_COMPRESS_INVALID SPICE_IMAGE_COMPRESSION_INVALID
#define SPICE_IMAGE_COMPRESS_OFF SPICE_IMAGE_COMPRESSION_OFF
#define SPICE_IMAGE_COMPRESS_AUTO_GLZ SPICE_IMAGE_COMPRESSION_AUTO_GLZ
#define SPICE_IMAGE_COMPRESS_AUTO_LZ SPICE_IMAGE_COMPRESSION_AUTO_LZ
#define SPICE_IMAGE_COMPRESS_QUIC SPICE_IMAGE_COMPRESSION_QUIC
#define SPICE_IMAGE_COMPRESS_GLZ SPICE_IMAGE_COMPRESSION_GLZ
#define SPICE_IMAGE_COMPRESS_LZ SPICE_IMAGE_COMPRESSION_LZ
#define SPICE_IMAGE_COMPRESS_LZ4 SPICE_IMAGE_COMPRESSION_LZ4

int spice_server_set_image_compression(SpiceServer *s,
                                       SpiceImageCompression comp);
SpiceImageCompression spice_server_get_image_compression(SpiceServer *s);


The 'spice_image_compression_t' used to be defined in a header part of
spice-server, but with the 0.12.6, this is no longer the case, it's now defined
outside of this source RPM (in spice-protocol).
However, the change should be API/ABI compatible, so it's unexpected to have
abipkgdiff complain about it, especially saying that the
spice_image_compression_t arg/return value was removed while it's still there.

The second issue is that the SpiceServer argument to these functions do not
appear in the output produced by abipkgdiff, it  only kept the
spice_image_compression_t argument

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

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

end of thread, other threads:[~2017-01-18  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-01  0:00 [Bug default/21058] New: Inaccurate abipkgdiff report cfergeau at redhat dot com
2017-01-01  0:00 ` [Bug default/21058] abipkgdiff dropping types not defined in devel packages by default leads to wrong reports dodji at redhat dot com
2017-01-01  0:00 ` [Bug default/21058] Inaccurate abipkgdiff report dodji at redhat dot com
2017-01-01  0:00 ` [Bug default/21058] abipkgdiff dropping types not defined in devel packages by default leads to wrong reports 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).