The stock assert() works because rtld-libc includes a custom
implementation of __assert().
Obtained from: CheriBSD
Sponsored by: AFRL, DARPA
Differential D54712
rtld: Switch to using <assert.h> for assert Authored by jhb on Wed, Jan 14, 3:30 PM. Tags None Referenced Files
Details
The stock assert() works because rtld-libc includes a custom Obtained from: CheriBSD
Diff Detail
Event TimelineComment Actions One consequence of this change is that NDEBUG will now disable assertions in rtld itself (and not just the bits of libc pulled into rtld-libc.a). Downstream in CheriBSD we #undef'd NDEBUG in debug.h, but I think honoring NDEBUG might be the better approach? Comment Actions I'm agnostic on the NDEBUG issue, though have 'never disable assert' leanings. But just leanings, since performance is also important and I don't know the lay of the land here to have an informed opinion. Comment Actions We don't enable NDEBUG by default when building FreeBSD currently (MK_ASSERT_DEBUG defaults to yes), so you already have to opt into that for world. |