While using SDE emulator to run AVX512 code one of my colleague reported an error:
SDE ERROR: DEREFERENCING BAD MEMORY POINTER
Short analysis of the log content revealed that aforementioned error was caused by __libc_free function probably its prologue when copying seemingly corrupted address of its argument (void *). The MEMEA contains a value of 0x7fffffff8 which is not a valid address and might be a corrupted higher part of local stack address (probably pointer) passed to __libc_free. The PC (RIP) points to this value: 0x7f1712c807c0 which is an effective address of this line of machine code: mov rax, qword ptr [rdi-0x8].
The emulated code does not contain any dynamic memory allocation calls, and I suspect that some other linked library code might have called malloc() function. There is a possibility that the error was caused by SDE implementation itself, but I do not have a coredump or even a callstack available to inspect.
Here is the relevant log
SDE ERROR: DEREFERENCING BAD MEMORY POINTER PC=0x7f1712c807c0 MEMEA=0x7ffffff8 mov rax, qword ptr [rdi-0x8]
Thank you for your help