backward/forward binary compatibility checker

Andrey Ponomarenko susanin at ispras.ru
Fri Jul 31 16:31:50 BST 2009


We have released 1.0.0 version of ABI compliance checker where we have
fixed all problems concerned with checking layout of virtual tables and
bit fields in structural types. Bug "Size of QByteArrayMatcher has been
changed from 1032 to 1024 bytes" also has been fixed (it was error in
the internal syntax tree parser).

Matthew Woehlke wrote:
> Thiago Macieira wrote:
>> === section Problems in Data Types (High risk)
>> QByteArrayMatcher:
>> The report says "Size of this type has been changed from 1032 to 1024
>> bytes". That's completely wrong. Here's the diff:
>>
>>  private:
>>      QByteArrayMatcherPrivate *d;
>>      QByteArray q_pattern;
>> -    uint q_skiptable[256];
>> +    union {
>> +        uint dummy[256];
>> +        struct {
>> +            uchar q_skiptable[256];
>> +            const uchar *p;
>> +            int l;
>> +        } p;
>> +    };
>>
>> As you can see, the size holds the same, at
>> sizeof(QByteArrayMatcherPrivate *) + sizeof(QByteArray) +
>> 256*sizeof(int) = 4 + 4 + 1024 = 1032. I have no clue how it came up
>> with 1024, since there's no addition that would result in that.
>
> If you assume that the 'changed from' is backwards (old was 1024, new
> is 1032), that sure looks right to me (for 32-bit systems)... the old
> is obviously 1024 bytes, the new is a struct containing a 1024-byte
> member, a pointer, and a 4-byte member = 1032 bytes.
>
> Am I missing a way to pack the three members of that struct (one of
> which is 1024 bytes by itself) into 1024 bytes?
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Abi-compliance-checker-1.0.0.tar.gz
Type: application/x-gzip
Size: 42693 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090731/9cfe5340/attachment.bin>


More information about the kde-core-devel mailing list