[haiku-commits] haiku: hrev54125 - headers/posix src/system/kernel/util

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 3 May 2020 11:42:45 -0400 (EDT)

hrev54125 adds 1 changeset to branch 'master'
old head: 3268566c205ea9021c52c22c57d4cdc1b0637b1a
new head: d0e1eb7a7bbe3e0f66c0637665385651b830287d
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=d0e1eb7a7bbe+%5E3268566c205e

----------------------------------------------------------------------------

d0e1eb7a7bbe: mark abort() function as noreturn.
  
  It was not specified as such before C11, but that's only because there
  was no C standard way to do it until then.
  
  Fixes #15955.
  
  Change-Id: Ied7b7fd94988ed7724460917aebc859b74eaa585
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/2558
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev54125
Commit:      d0e1eb7a7bbe3e0f66c0637665385651b830287d
URL:         https://git.haiku-os.org/haiku/commit/?id=d0e1eb7a7bbe
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Sun May  3 09:20:23 2020 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Sun May  3 15:42:41 2020 UTC

Ticket:      https://dev.haiku-os.org/ticket/15955

----------------------------------------------------------------------------

2 files changed, 3 insertions(+), 2 deletions(-)
headers/posix/stdlib.h                | 2 +-
src/system/kernel/util/kernel_cpp.cpp | 3 ++-

----------------------------------------------------------------------------

diff --git a/headers/posix/stdlib.h b/headers/posix/stdlib.h
index d1db4ab5db..4890caf0a2 100644
--- a/headers/posix/stdlib.h
+++ b/headers/posix/stdlib.h
@@ -52,7 +52,7 @@ extern int            posix_memalign(void **_pointer, size_t 
alignment, size_t size);
 extern void            *realloc(void *oldPointer, size_t newSize);
 
 /* process termination */
-extern void            abort(void);
+extern void            abort(void) __attribute__((noreturn));
 extern int             atexit(void (*func)(void));
 extern int             atfork(void (*func)(void));
 extern void            exit(int) __attribute__((noreturn));
diff --git a/src/system/kernel/util/kernel_cpp.cpp 
b/src/system/kernel/util/kernel_cpp.cpp
index 62f098b8d7..db28cb958f 100644
--- a/src/system/kernel/util/kernel_cpp.cpp
+++ b/src/system/kernel/util/kernel_cpp.cpp
@@ -381,7 +381,8 @@ extern "C"
 void
 abort()
 {
-       panic("abort() called!");
+       while (true)
+               panic("abort() called!");
 }
 
 


Other related posts:

  • » [haiku-commits] haiku: hrev54125 - headers/posix src/system/kernel/util - waddlesplash