From dbfdfb8a76b2e6dac950a140d9481dbd23d9bfa8 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Wed, 1 Feb 2017 07:50:21 +0100 Subject: [PATCH] Updated Hunting crashes: The ultimate guide (rest) --- Hunting-crashes:-The-ultimate-guide.rest | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Hunting-crashes:-The-ultimate-guide.rest b/Hunting-crashes:-The-ultimate-guide.rest index 8c3e2bd..7027209 100644 --- a/Hunting-crashes:-The-ultimate-guide.rest +++ b/Hunting-crashes:-The-ultimate-guide.rest @@ -28,9 +28,12 @@ Test different compiler options ``-d:release`` vs debug mode is the obvious choice, but the Nim GC, allocator and standard library have many more checks you can should enable: -| -d:useSysAssert enables assertions in the system.nim, especially in Nim's allocator. -| -d:useGcAssert enables assertions in Nim's GC. -| -d:nimBurnFree overwrite deallocated memory with 0xff bytes so that "access after free" triggers a segfault. +``-d:useSysAssert`` + enables assertions in the system.nim, especially in Nim's allocator. +``-d:useGcAssert`` + enables assertions in Nim's GC. +``-d:nimBurnFree`` + overwrite deallocated memory with 0xff bytes so that "access after free" triggers a segfault. Edit lib/system/mmdisp.nim and gc.nim =====================================