diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2012-06-29 09:50:00 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2012-06-29 09:50:00 -0700 |
commit | 4ecc2eee96ca522e0cd4f00d2d27e3f2df90bc08 (patch) | |
tree | 00cdeefb460395140aadac2a8763122f93abf599 /core | |
parent | 6cad5d1c2d72330ecd2a749954a0de1927a0474e (diff) | |
download | syslinux-4ecc2eee96ca522e0cd4f00d2d27e3f2df90bc08.tar.gz |
SEG(): centralize the bad bailout
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/kaboom.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/kaboom.c b/core/kaboom.c index d639915a..9bb30736 100644 --- a/core/kaboom.c +++ b/core/kaboom.c @@ -4,6 +4,18 @@ #include "core.h" +#ifdef DEBUG + +#include <dprintf.h> + +__noreturn __bad_SEG(const volatile void *p) +{ + dprintf("SEG() passed an invalid pointer: %p\n", p); + kaboom(); +} + +#endif + #undef kaboom __noreturn _kaboom(void) |