[Poppler-bugs] [Bug 97506] GooString wastes 4 bytes on 64-bit systems

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Aug 27 23:07:54 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=97506

--- Comment #6 from Jakub Kucharski <jakubkucharski97 at gmail.com> ---
(In reply to Albert Astals Cid from comment #4)
> elf-dissector disagrees with your patch
> 
> class GooString // location: /home/tsdgeos/devel/poppler/goo/GooString.h:49
> {
>     char[36] sStatic; // member offset: 0, size: 36, alignment: 1
>     int length; // member offset: 36, size: 4, alignment: 4
>     char* s; // member offset: 40, size: 8, alignment: 8
> }; // size: 48, alignment: 8
> Used bytes: 48/48 (100%)
> Used bits: 384/384 (100%)
> 
> This is with your patch, GooString is now 48 bytes instead of 32. 
> 
> but agrees with your bug (without the patch it says)
> 
> class GooString // location: /home/tsdgeos/devel/poppler/goo/GooString.h:49
> {
>     char[16] sStatic; // member offset: 0, size: 16, alignment: 1
>     int length; // member offset: 16, size: 4, alignment: 4
>     // 4 byte(s) padding
>     char* s; // member offset: 24, size: 8, alignment: 8
> }; // size: 32, alignment: 8
> 
> Used bytes: 28/32 (87.5%)
> Used bits: 224/256 (87.5%)

Are you sure elf-dissector is right? I don't know this tool, but when I run
something with poppler with the above patch, it doesn't complain.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20160827/0eab66e0/attachment.html>


More information about the Poppler-bugs mailing list