[Interest] ASSERT / Debug Crash in Qt 5.3.2. WTF, Windows x64, LLIntData.cpp at bitwise_cast<uint32_t*>(&testVector)[sizeof(void*)/sizeof(uint32_t) + 1] == 42)
Andre Barth
Andre.Barth at autodesk.com
Mon Oct 13 00:00:13 CEST 2014
Hi Allan,
>>> Since they belong to different classes, could it be that each inherited class in win64 starts on a 64bit aligned address, where they are places more compact on other x64 platforms?
Not in general, I'd say - at least not for 'normal' classes. I'm not an expert when it comes to the C++ object model and alignments, and I might be totally wrong here, but in a quick test the 4-byte-long member variable of "derived" followed the "base" member directly, i.e. was not aligned at the 64-bit address using the default compiler settings.
Apart from that & from your POV - is the failing assert problematic?
Thanks,
Andre
-----Original Message-----
From: Allan Sandfeld Jensen [mailto:carewolf at gmail.com] On Behalf Of Allan Sandfeld Jensen
Sent: Friday, October 10, 2014 5:22 PM
To: Andre Barth
Cc: interest at qt-project.org
Subject: Re: [Interest] ASSERT / Debug Crash in Qt 5.3.2. WTF, Windows x64, LLIntData.cpp at bitwise_cast<uint32_t*>(&testVector)[sizeof(void*)/sizeof(uint32_t) + 1] == 42)
Hi
On Friday 10 October 2014, Andre Barth wrote:
> Hi Allan,
>
> castResult[3] is indexResult - forgot to print that explicitly; sorry
>
> indexedResult
> 0xcccccccc
>
> Anyway:
> Here's the complete layout
> &testVector
> 0x000000000026e8e8 {m_size=42 }
> WTF::VectorBuffer<int,0>: {...}
> m_size: 42
> &testVector.m_size
> 0x000000000026e8f8 {42}
> &testVector.m_capacity
> 0x000000000026e8f0 {42}
>
This looks like the culprit. Size and capacity are each only 32 integers but the m_size has been placed on a 64bit aligned address leaving 4byte gap. .
Since they belong to different classes, could it be that each inherited class in win64 starts on a 64bit aligned address, where they are places more compact on other x64 platforms?
`Allan
More information about the Interest
mailing list