[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Re: Review Request 119490: Fix startup crash on Windows/MSVC
From: "Kevin Funk" <kfunk () kde ! org>
Date: 2014-07-26 15:37:03
Message-ID: 20140726153703.4048.217 () probe ! kde ! org
[Download RAW message or body]
--===============3677303600294635039==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119490/#review63219
-----------------------------------------------------------
"Ouch". MSVC...
- Kevin Funk
On July 26, 2014, 3:21 p.m., Nicolás Alvarez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119490/
> -----------------------------------------------------------
>
> (Updated July 26, 2014, 3:21 p.m.)
>
>
> Review request for Kate and Dāvis Mosāns.
>
>
> Repository: ktexteditor
>
>
> Description
> -------
>
> MSVC uses a different representation for pointers to member functions depending on \
> the complexity of the class inheritance, and uses a general representation if it \
> can't determine the inheritance tree, such as if it only sees a forward declaration \
> of the class. This means pointers to members get a different size depending on \
> whether the class is forward- declared or fully defined. Which violates the C++ \
> standard, by the way :)
> ViMode::Command (which contains a pointer to member function) got a different size \
> in translation units that included normalvimode.h than in those that didn't, \
> causing crashes. Solved by including normalvimode.h from command.h so that the \
> class is always fully defined.
>
> Diffs
> -----
>
> src/vimode/command.h 6c864e8
> src/vimode/motion.h 78d94da
>
> Diff: https://git.reviewboard.kde.org/r/119490/diff/
>
>
> Testing
> -------
>
> Compiles and finally runs on Windows with MSVC2013.
>
>
> Thanks,
>
> Nicolás Alvarez
>
>
--===============3677303600294635039==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/119490/">https://git.reviewboard.kde.org/r/119490/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">"Ouch". MSVC...</p></pre> <br />
<p>- Kevin Funk</p>
<br />
<p>On July 26th, 2014, 3:21 p.m. UTC, Nicolás Alvarez wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for Kate and Dāvis Mosāns.</div>
<div>By Nicolás Alvarez.</div>
<p style="color: grey;"><i>Updated July 26, 2014, 3:21 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
ktexteditor
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">MSVC uses a different representation for pointers to \
member functions depending on the complexity of the class inheritance, and uses a \
general representation if it can't determine the inheritance tree, such as if it only \
sees a forward declaration of the class. This means pointers to members get a \
different size depending on whether the class is forward- declared or fully defined. \
Which violates the C++ standard, by the way :)</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">ViMode::Command (which contains a pointer to member function) got a \
different size in translation units that included normalvimode.h than in those that \
didn't, causing crashes. Solved by including normalvimode.h from command.h so that \
the class is always fully defined.</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Compiles and finally runs on Windows with \
MSVC2013.</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/vimode/command.h <span style="color: grey">(6c864e8)</span></li>
<li>src/vimode/motion.h <span style="color: grey">(78d94da)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/119490/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============3677303600294635039==--
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic