33
44#include "abstraction/error.h"
55#include <linux/kernel.h>
6+ #include <linux/objtool.h>
67#include <linux/printk.h>
78
89__attribute__((noreturn )) static void
910default_unrecoverbale_error_callback (const char * const message )
1011{
1112 pr_emerg ("%s" , message );
12- panic (message );
13+ panic ("%s" , message );
1314 while (1 )
1415 ; // panic will never return.
1516 // To fix a error reported by objtool this loop is necessary
@@ -18,7 +19,8 @@ default_unrecoverbale_error_callback(const char *const message)
1819void clltk_unrecoverbale_error_callback (const char * const )
1920 __attribute__((weak , noreturn , alias ("default_unrecoverbale_error_callback" )));
2021
21- void unrecoverable_error (const char * file , size_t line , const char * func , const char * format , ...)
22+ __attribute__((noreturn )) void unrecoverable_error (const char * file , size_t line , const char * func ,
23+ const char * format , ...)
2224{
2325 char clltk_format [1024 ];
2426 char clltk_message [512 ];
@@ -36,7 +38,9 @@ void unrecoverable_error(const char *file, size_t line, const char *func, const
3638 va_end (args );
3739
3840 clltk_unrecoverbale_error_callback (clltk_message );
41+ __builtin_unreachable ();
3942}
43+ STACK_FRAME_NON_STANDARD (unrecoverable_error );
4044
4145void recoverable_error (const char * file , size_t line , const char * func , const char * format , ...)
4246{
0 commit comments