diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2013-04-28 18:39:46 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-05-01 14:22:37 -0500 |
commit | 12bb660f69bc7d7bd4cab92621ee2d5b3963ab62 (patch) | |
tree | a5422e50ee94c990caf67afd3ee7654a98ec56f4 /src/lib/assert.C | |
parent | e319acb36befe9fbbdd71565ec570d5977be532b (diff) | |
download | talos-hostboot-12bb660f69bc7d7bd4cab92621ee2d5b3963ab62.tar.gz talos-hostboot-12bb660f69bc7d7bd4cab92621ee2d5b3963ab62.zip |
Enhance heap corruption detection.
Change-Id: I25ec156fe3c9088d2de2254017407dbadd2fac31
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4255
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/lib/assert.C')
-rw-r--r-- | src/lib/assert.C | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/assert.C b/src/lib/assert.C index ebf59fb3f..28348bbc1 100644 --- a/src/lib/assert.C +++ b/src/lib/assert.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -29,6 +29,7 @@ #include <assert.h> #include <sys/task.h> #include <arch/ppc.H> +#include <kernel/misc.H> #include <kernel/hbterminatetypes.H> #include <kernel/terminate.H> @@ -40,6 +41,11 @@ namespace TRACE { void (*traceCallback)(void*, size_t) = NULL; }; extern "C" void __assert(AssertBehavior i_assertb, int i_line) { + if ((i_assertb == ASSERT_CRITICAL) && (KernelMisc::in_kernel_mode())) + { + i_assertb = ASSERT_KERNEL; + } + switch (i_assertb) { case ASSERT_TRACE_DONE: // Custom trace was provided. |