[webkit-dev] Potential problem with member function pointer sizes

Vienneau, Christopher cvienneau at ea.com
Thu Apr 14 09:20:53 PDT 2016

It seems like a possible cause of the bug you posted, since memory gets trashed by the inconsistent sizes it could manifest itself in several ways.  The quickest way to validate is probably to compile with the /vmg option which will prevent the issue from occurring in all cases (at the cost of un-optimal member function pointer sizes).

A few other techniques were brought to my attention which you may choose if you find that this is indeed the problem, the complete list now looks like:

·         Provide the definition of the class before declaring the member function pointer

·         decorate the forward declarations with the inheritance specifiers as described here: https://msdn.microsoft.com/en-us/library/ck561bfk.aspx

·         use the pointers_to_members pragma described here: https://msdn.microsoft.com/en-us/library/83cch5a6.aspx

·         use the /vmg compiler flag


From: Isaac Devine [mailto:isaac at devinesystems.co.nz]
Sent: Wednesday, April 13, 2016 4:27 PM
To: Vienneau, Christopher <cvienneau at ea.com>
Cc: WebKit Development <webkit-dev at lists.webkit.org>
Subject: Re: [webkit-dev] Potential problem with member function pointer sizes

Hi Chris,

I wonder whether what you have reported would cause this issue:


On 14 April 2016 at 09:17, Vienneau, Christopher <cvienneau at ea.com<mailto:cvienneau at ea.com>> wrote:

I just wanted to give a heads up on an issue I recently investigated, the details can be seen in this forums post:
The short version is that the MSVC compiler will do the wrong then when making a member function pointer to a class that it only has a forward declaration for.  This can be fixed by either providing the definition for the class or by using the /vmg compiler flag.

I did not experience this problem with Apples WinCairo sample, but I suspect it could happen.

Chris Vienneau

webkit-dev mailing list
webkit-dev at lists.webkit.org<mailto:webkit-dev at lists.webkit.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20160414/781d9f89/attachment.html>

More information about the webkit-dev mailing list