diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-01-15 14:58:06 +0100 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-01-16 03:12:54 +0100 |
commit | 49057a1eab3d226d504db0e12e65e27fa9b42c2d (patch) | |
tree | 74c6f0d5b3099c5b72f399e5d77a66d3df16e8f3 /src/testlib/qtest_widgets.h | |
parent | 47f99cacc42488a87eb6f3ea969cf9238a1d896f (diff) |
QVariant: attempt to work around an ICE on linux-arm-gnueabi-g++ (Ubuntu 11.10) with constexpr QSizePolicy
This is the error:
src/corelib/kernel/qvariant_p.h: In constructor ‘QVariantPrivateSharedEx<T>::QVariantPrivateSharedEx() [with T = QSizePolicy]’:
src/corelib/kernel/qvariant_p.h:107:61: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:3560
There are two things fishy in this file:
1. Use of the unnamed namespace in a file that gets included
in different libraries. While not technically undefined
behavior, it may become so when used in the implementation,
which it is.
2. Missing explicit initialization of a member of
QVariantPrivateSharedEx. This is just a wild guess, because
the ICE happens in that line. That class itself is quite
smelly, because the address of an object is taken before
the lifetime of the object begins. A fix would be to store
the object in a wrapper class from which QVPSEx inherits
_first_, but then a cast from QVPSEx to QVariant::PrivateShared
would require pointer adjustments, and I didn't look through
all the code to determine whether that would be an issue.
Having been bitten by this sometime ago:
https://marcmutz.wordpress.com/private-practice/private-practice-taming-templates/#edit-20111128
I opted to do these easy changes first to see whether they
already fix the ICE.
Change-Id: Ic15fd928b3dff2318c425c915b2dab5e54254d71
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/testlib/qtest_widgets.h')
0 files changed, 0 insertions, 0 deletions