[Lazarus] Debugger stops in c dll even when no breakpoint set

Christo Crause christo.crause at gmail.com
Fri Oct 29 12:48:33 CEST 2021

On Fri, Oct 29, 2021 at 10:41 AM Luca Olivetti via lazarus <
lazarus at lists.lazarus-ide.org> wrote:

> I now tested under windows 10 64 bits (the exe is 32 bits, the previous
> test was under windows 7 32 bits), and here instead of stopping once in
> ntdll!RtlpNtMakeTemporaryKey it stops twice: in ntdll!RtlZeroHeap and in
> ntdll!RtlCaptureStackContext.
> The former (RtlZeroHeap) shows what it seems a bogus call stack (i.e.
> just two levels, the RtlZeroHeap itself and 00000000).

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:

Since the code writes something to memory in the int3 branch, check errno
to see if that reveals something.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20211029/da929d43/attachment.html>

More information about the lazarus mailing list