// Allow call on null pointer
if (this == 0) return 0;
Crash is on the first mov instruction here:(gdb) disas
Dump of assembler code for function asCTypeInfo::CastToObjectType():
=> 0x00005555557acc80 <+0>: mov eax,DWORD PTR [rdi+0x30]
0x00005555557acc83 <+3>: test eax,0x2000003
0x00005555557acc88 <+8>: je 0x5555557acca0 <asCTypeInfo::CastToObjectType()+32>
0x00005555557acc8a <+10>: test eax,0x1000000
0x00005555557acc8f <+15>: mov eax,0x0
0x00005555557acc94 <+20>: cmove rax,rdi
0x00005555557acc98 <+24>: ret
0x00005555557acc99 <+25>: nop DWORD PTR [rax+0x0]
0x00005555557acca0 <+32>: xor eax,eax
0x00005555557acca2 <+34>: ret
GCC 6 changelist mentions this:Value range propagation now assumes that the this pointer of C++ member functions is non-null. This eliminates common null pointer checks but also breaks some non-conforming code-bases (such as Qt-5, Chromium, KDevelop). As a temporary work-around -fno-delete-null-pointer-checks can be used. Wrong code can be identified by using -fsanitize=undefined.