[Bug default/31513] New: abidiff differences due to change in compiler version

quic_ashudas at quicinc dot com sourceware-bugzilla@sourceware.org
Wed Mar 20 05:57:27 GMT 2024


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

            Bug ID: 31513
           Summary: abidiff differences due to change in compiler version
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: quic_ashudas at quicinc dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

We have created a shared library using the below source file, We are observing
abi differences as when we run abidiff on the library when compiled with
different compiler version GCC 7.5.0 and GCC 11.4.0

Ques 1: Is this behavior expected as we have not made any change in the source
files of the library the highlighted changes are in compiler source files.

Ques 2: If yes, can you share a suppression file to ignore all the changes
which  are not from the elf source file.


#include <iostream>
#include <string>
#include <vector>

namespace qiifa{

       class class1{
                public:
                        class1();
                        std::string generate_lorem_ipsum(unsigned int length);
                        int addnums(int x, int y);
                        int subnums(int x, int y);
                private:
                        std::vector<char> letters;

        };

}

Abidiff log

"Functions changes summary: 0 Removed, 1 Changed (3 filtered out), 0 Added
functions
 Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

 1 function with some indirect sub-type change:

   [C] 'method int qiifa::class1::addnums(int, int)' has some indirect sub-type
changes:
     implicit parameter 0 of type 'qiifa::class1* const' has sub-type changes:
       in unqualified underlying type 'qiifa::class1*':
         in pointed to type 'class qiifa::class1':
           type size hasn't changed
           1 data member change:
             type of 'std::vector<char, std::allocator<char> > letters'
changed:
               type size hasn't changed
               1 base class change:
                 'struct std::_Vector_base<char, std::allocator<char> >'
changed:
                   type size hasn't changed
                   1 data member change:
                     type of 'std::_Vector_base<char, std::allocator<char>
>::_Vector_impl _M_impl' changed:
                       type size hasn't changed
                       1 base class insertion:
                         struct std::_Vector_base<char, std::allocator<char>
>::_Vector_impl_data
                       3 data member deletions:
                         'std::_Vector_base<char, std::allocator<char>
>::pointer _M_start', at offset 0 (in bits)
                         'std::_Vector_base<char, std::allocator<char>
>::pointer _M_finish', at offset 64 (in bits)
                         'std::_Vector_base<char, std::allocator<char>
>::pointer _M_end_of_storage', at offset 128 (in bits)

 "

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


More information about the Libabigail mailing list