Ensure assert_fail and abort have noreturn attribute
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
||||
uintptr_t __stack_chk_guard = 0xd048c37519fcadfe;
|
||||
|
||||
// manually define detailed abort function
|
||||
void __abort(const char *func, const char *file, int line);
|
||||
void __abort(const char *func, const char *file, int line) __attribute__((noreturn));
|
||||
|
||||
__attribute__((noreturn))
|
||||
void __stack_chk_fail(void) {
|
||||
|
||||
@@ -3,12 +3,3 @@ double strtod(const char *nptr, char **endptr);
|
||||
long double strtold(const char *nptr, char **endptr) {
|
||||
return (long double)strtod(nptr, endptr);
|
||||
}
|
||||
|
||||
// manually define detailed abort function
|
||||
void __abort(const char *func, const char *file, int line);
|
||||
|
||||
// backup definition of abort for programs that link it directly
|
||||
void abort(void) {
|
||||
// call detailed abort function
|
||||
__abort(__func__, __FILE__, __LINE__);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user