[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 11:04:08 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=185801

--- Comment #7 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
(In reply to JF Bastien from comment #5)
> (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.

Right, but they take no space when inherited from, so we need to take this into account.

> There's also the empty base optimization to take into account:
> 
> https://en.cppreference.com/w/cpp/language/ebo

Good to know.

> 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).

-- 
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/f9ff8256/attachment-0001.html>


More information about the webkit-unassigned mailing list