diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-04-12 21:47:47 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-04-12 21:47:47 +0000 |
commit | 0003df26691626da39d85b2ee1accdeb534684b2 (patch) | |
tree | 4e1ebec7624e9ff753a1e1c6c4a8f0fb8151aec0 /sys/kern/kern_malloc.c | |
parent | c96c8d60569ece4c81cfeed0d77047930008fb2d (diff) |
Allow machine-dependant overrides for the ``deadbeef'' sentinel values,
and make sure that nothing can ever be mapped at theses addresses.
Only i386 overrides the default for now.
From mickey@, ok art@ miod@
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r-- | sys/kern/kern_malloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 42291b0c7e6..cd7a54107ef 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_malloc.c,v 1.68 2007/04/11 12:10:42 art Exp $ */ +/* $OpenBSD: kern_malloc.c,v 1.69 2007/04/12 21:47:45 miod Exp $ */ /* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */ /* @@ -101,7 +101,11 @@ const long addrmask[] = { 0, * The WEIRD_ADDR is used as known text to copy into free objects so * that modifications after frees can be detected. */ +#ifdef DEADBEEF0 +#define WEIRD_ADDR ((unsigned) DEADBEEF0) +#else #define WEIRD_ADDR ((unsigned) 0xdeadbeef) +#endif #define MAX_COPY 32 /* |