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

Allan Sandfeld Jensen kde at carewolf.com
Fri Oct 10 15:09:17 CEST 2014


On Friday 10 October 2014, Andre Barth wrote:
> Hi all,
> 
> I built a JIT-free version of Qt 5.3.2 (Win64) and now run into this
> assertion in
> 
> ..\Qt\qtwebkit\Source\JavaScriptCore\llint\LLIntData.cpp
> 
> Vector<int> testVector;
> testVector.resize(42);
> ASSERT(bitwise_cast<uint32_t*>(&testVector)[sizeof(void*)/sizeof(uint32_t)+
>  1] == 42);
> 
> Here is a bug report / changeset I've found wrt this:
> 
> http://trac.webkit.org/changeset/148896/trunk/Source/JavaScriptCore/llint/L
> LIntData.cpp
> 
> and
> 
> https://bugs.webkit.org/show_bug.cgi?id=97268
> 
> The assert is supposed to check, that the Vector's m_size variable is at
> the correct address, I guess?!
> 
> If not, anyone can shed a light on this and explain the purpose of it and
> where I might have incorrect compilation settings applied?
> 
> Am I missing somewhere an alignment pragma or something to make this
> (sizeof(void*)/sizeof(uint32_t))
> always calculate the right address - regardless of whether its x86 or x64?
> 
There are some differences between alignment and exact types between linux x64 
and win x64. Could you test what (sizeof(void*)/sizeof(uint32_t)) is, and what 
is on the first few ints of the address of Vector<int> after a resize(42)?

Anyway, it might we worth opening a bug for to track the issue. Even if the 
assert turns out to be harmless, the binaries should be able to run in debug 
versions (even win64).

`Allan



More information about the Interest mailing list