[Haskell-cafe] mallocForeignPtrArray with check against buffer overflows
Joachim Durchholz
jo at durchholz.org
Fri Apr 27 04:42:41 UTC 2018
Am 26.04.2018 um 08:50 schrieb Henning Thielemann:
>
> I like to test whether some low-level routines overwrite non-allocated
> memory area. On the Amiga there was the program Mungwall that surrounded
> memory blocks with some byte patterns at allocation and checked the
> integrity of those patterns at deallocation.
Today, it's called a "canary value". Most C compilers have an option to
activate this mode for all allocations.
I don't know whether GHC's native backend has such an option, but the
LLVM backend should.
Regards,
Jo
More information about the Haskell-Cafe
mailing list