<div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 29, 2021 at 10:41 AM Luca Olivetti via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
I now tested under windows 10 64 bits (the exe is 32 bits, the previous <br>
test was under windows 7 32 bits), and here instead of stopping once in <br>
ntdll!RtlpNtMakeTemporaryKey it stops twice: in ntdll!RtlZeroHeap and in <br>
ntdll!RtlCaptureStackContext.<br>
The former (RtlZeroHeap) shows what it seems a bogus call stack (i.e. <br>
just two levels, the RtlZeroHeap itself and 00000000).<br></blockquote><div><br></div><div>Searching around seems to suggest that RtlpNtMakeTemporaryKey is typically part of a stack trace involving memory/stack corruption or freeing an invalid reference or already freed pointer. See this example: <a href="https://stackoverflow.com/questions/45162248/calling-free-in-c-triggers-ntdlldbgbreakpoint-in-debug-but-crashes-in-rel/45247035">https://stackoverflow.com/questions/45162248/calling-free-in-c-triggers-ntdlldbgbreakpoint-in-debug-but-crashes-in-rel/45247035</a></div></div><div class="gmail_quote"><br></div><div class="gmail_quote">Since the code writes something to memory in the int3 branch, check errno to see if that reveals something.<br></div></div>