Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 2026 15:29:10 +0000
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4f536daec8fb - stable/15 - rtld: Switch to using <assert.h> for assert
Message-ID:  <69eb8c46.33b53.487f66df@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=4f536daec8fbfc05ae0097a825386848056cbbbd

commit 4f536daec8fbfc05ae0097a825386848056cbbbd
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-01-14 17:10:33 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-04-24 15:26:38 +0000

    rtld: Switch to using <assert.h> for assert
    
    The stock assert() works because rtld-libc includes a custom
    implementation of __assert().
    
    Reviewed by:    imp, kib
    Obtained from:  CheriBSD
    Sponsored by:   AFRL, DARPA
    Differential Revision:  https://reviews.freebsd.org/D54712
    
    (cherry picked from commit 3ea97c9de2b24c685d42be12dd57fad2f67b3f1b)
---
 libexec/rtld-elf/debug.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libexec/rtld-elf/debug.h b/libexec/rtld-elf/debug.h
index 1a019f07750a..09de6057e1e7 100644
--- a/libexec/rtld-elf/debug.h
+++ b/libexec/rtld-elf/debug.h
@@ -33,7 +33,7 @@
 #define DEBUG_H 1
 
 #include <sys/cdefs.h>
-
+#include <assert.h>
 #include <string.h>
 #include "rtld_paths.h"
 #include "rtld_printf.h"
@@ -47,9 +47,6 @@ extern int debug;
 #define dbg(...)	((void) 0)
 #endif
 
-#define assert(cond)	((cond) ? (void) 0 :			\
-    (msg(_BASENAME_RTLD ": assert failed: " __FILE__ ":"	\
-      __XSTRING(__LINE__) "\n"), abort()))
 #define msg(s)		rtld_putstr(s)
 #define trace()		msg(_BASENAME_RTLD ": " __XSTRING(__LINE__) "\n")
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69eb8c46.33b53.487f66df>