[Webkit-unassigned] [Bug 185801] dump-class-layout reports wrong padding in many cases
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon May 21 09:50:03 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=185801
--- Comment #5 from JF Bastien <jfbastien at apple.com> ---
(In reply to Simon Fraser (smfr) from comment #1)
> There are various things wrong here (testing on JSC::PostfixNode)
> 1. lldb reports the size of zero-sized classes as 1, throwing off padding.
Empty objects have to use at least one byte of storage for their address to be distinct, so lldb is reporting the right information.
There's also the empty base optimization to take into account:
https://en.cppreference.com/w/cpp/language/ebo
I'm not sure there's a way to query for padding bits. Even in C++ there's no trait for it, despite my attempts (there's http://en.cppreference.com/w/cpp/types/has_unique_object_representations but it doesn't do what you want).
> 2. The script adds padding to nested classes even when the compiler compacts
> subsequent fields
> 3. The 'seenOffset' bailing is wrong.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180521/609a6100/attachment.html>
More information about the webkit-unassigned
mailing list