summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2012-06-29 09:50:00 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2012-06-29 09:50:00 -0700
commit4ecc2eee96ca522e0cd4f00d2d27e3f2df90bc08 (patch)
tree00cdeefb460395140aadac2a8763122f93abf599 /core
parent6cad5d1c2d72330ecd2a749954a0de1927a0474e (diff)
downloadsyslinux-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.c12
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)