From de9b7d712bf5da6593386fd4fbca0d5f8b8431d8 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 1 Jun 2018 07:04:45 +0200 Subject: Add RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE An invalid heap usage such as a double free is usually a fatal error since this indicates a use after free. Replace the use of printk() in free() with a fatal error. Update #3437. --- cpukit/include/rtems/score/interr.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cpukit/include/rtems/score/interr.h') diff --git a/cpukit/include/rtems/score/interr.h b/cpukit/include/rtems/score/interr.h index 3144952716..f09072d5fb 100644 --- a/cpukit/include/rtems/score/interr.h +++ b/cpukit/include/rtems/score/interr.h @@ -130,6 +130,13 @@ typedef enum { */ RTEMS_FATAL_SOURCE_PANIC = 11, + /** + * @brief Fatal source for invalid C program heap frees via free(). + * + * The fatal code is the bad pointer. + */ + RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE = 12, + /** * @brief The last available fatal source. * -- cgit v1.2.3