Skip to content

Commit ee4fe9e

Browse files
Adds bounds-safe interface for __assert_fail on Linux (checkedc#310)
Adds to assert_checked.h a bounds-safe interface for __assert_fail
1 parent a502de1 commit ee4fe9e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/assert_checked.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ extern void __assert(const char *msg : itype(_Nt_array_ptr<const char>),
2222
const char *file : itype(_Nt_array_ptr<const char>),
2323
int line);
2424

25+
#undef __assert_fail
26+
extern void __assert_fail (const char *__assertion : itype(_Nt_array_ptr<const char>), const char *__file : itype(_Nt_array_ptr<const char>),
27+
unsigned int __line, const char *__function : itype(const char _Nt_checked[]))
28+
__THROW __attribute__ ((__noreturn__));
29+
2530
#endif
2631

2732
#pragma CHECKED_SCOPE OFF

0 commit comments

Comments
 (0)