Crash on Windows with core.stdc.stdlib.free()

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Nov 13 02:17:19 PST 2014


On Thu, 13 Nov 2014 10:08:47 +0000
Chris via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com> wrote:

> Interesting though that it never crashes on Linux, only on 
> Windows did this cause problems.
seems that libc allocator is not marking free pages as "unreadable",
and windows libc allocator does something like this. i got alot of such
"use after free" things in my C code, but valgrind is brilliant to
track that down. i miss valgrind on windows. ;-)

now i prefer to write code in GNU/Linux if possible and use valgrind to
track down memory issues, and only after it works on linux and valgrind
is happy, i'm starting to port it to windows. this, of course, hard to
do with winapi-tied code, but wine/winelib can help there too (to some
extent).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20141113/1eb6ee4b/attachment.sig>


More information about the Digitalmars-d-learn mailing list