-
Notifications
You must be signed in to change notification settings - Fork 49
Description
We are using AngelScript version 2.31.1 and the latest asJIT compiler. Everything works fine, but we are facing a rare-ish bug where our game crashes at the same (JIT'd) function, on this line: (Function was fetched by dumping all function signatures and JIT addresses and matching it with the instruction pointer in an mdmp, line is an educated guess based on the byte offset and disassembly around the instructions)
if (di.Melee)
Here, di is of type DamageInfo and is passed to the function by value, and Melee is a bool. The class is defined in scripts with 2 constructors, a regular constructor (DamageInfo()) and one with a bunch of params for its properties. (So we're using the default copy constructor)
This is the disassembly corresponding to the script line above, where the crash occurs on 35745A9F:
35745A9C | 83 C3 1E | add ebx,1E |
35745A9F | 8B 03 | mov eax,dword ptr ds:[ebx] |
35745AA1 | 25 FF 00 00 00 | and eax,FF |
35745AA6 | 89 47 EC | mov dword ptr ds:[edi-14],eax |
35745AA9 | 8B 5F EC | mov ebx,dword ptr ds:[edi-14] |
35745AAC | 20 DB | and bl,bl |
35745AAE | 0F 84 39 00 00 00 | je 35745AED |
So far we've only seen this crash happen on Windows 32 bit (we don't have 64 bit builds though), but we haven't tested on our Linux builds to confirm whether it happens there, too.