Loading...
--- libmalloc/libmalloc-474.0.13/src/printf.h
+++ libmalloc/libmalloc-657.60.21/src/printf.h
@@ -20,6 +20,12 @@
*
* @APPLE_LICENSE_HEADER_END@
*/
+
+#include <stdarg.h>
+#include <stdint.h>
+
+#include <malloc/_ptrcheck.h>
+__ptrcheck_abi_assume_single()
#define MALLOC_REPORT_NOLOG 0x010
#define MALLOC_REPORT_NOPREFIX 0x020
@@ -60,28 +66,28 @@
// happening. In the case of MALLOC_REPORT_CRASH, the crash occurs after all of
// the other actions have completed.
MALLOC_NOEXPORT MALLOC_NOINLINE void
-malloc_report(uint32_t flags, const char *fmt, ...) __printflike(2,3);
+malloc_report(uint32_t flags, const char * __null_terminated fmt, ...) __printflike(2,3);
// Like malloc_report(), but does not send the text to _simple_asl_log() and
// does not write the program name, pid and thread identifier before the report
// text. Equivalent to malloc_report(MALLOC_REPORT_NOLOG|MALLOC_REPORT_NO_PREFIX)
MALLOC_NOEXPORT MALLOC_NOINLINE void
-malloc_report_simple(const char *fmt, ...) __printflike(1,2);
+malloc_report_simple(const char * __null_terminated fmt, ...) __printflike(1,2);
// Like malloc_report(), but precedes the output message with prefix_msg
// as a format string using prefix_arg as a single substition parameter,
// allows the length of time to sleep while reporting an error to be
// specified and passes the arguments to the fmt parameter in a va_list.
MALLOC_NOEXPORT MALLOC_NOINLINE void
-malloc_vreport(uint32_t flags, unsigned sleep_time, const char *prefix_msg,
- const void *prefix_arg, const char *fmt, va_list ap);
+malloc_vreport(uint32_t flags, unsigned sleep_time, const char * __null_terminated prefix_msg,
+ const void *prefix_arg, const char * __null_terminated fmt, va_list ap) __printflike(5,0);
// Higher-level functions used by zone implementations to report errors.
MALLOC_NOEXPORT MALLOC_NOINLINE void
-malloc_zone_error(uint32_t flags, bool is_corruption, const char *fmt, ...) __printflike(3,4);
+malloc_zone_error(uint32_t flags, bool is_corruption, const char * __null_terminated fmt, ...) __printflike(3,4);
MALLOC_NOEXPORT MALLOC_NOINLINE void
-malloc_zone_check_fail(const char *msg, const char *fmt, ...) __printflike(2,3);
+malloc_zone_check_fail(const char * __null_terminated msg, const char * __null_terminated fmt, ...) __printflike(2,3);
// Configures where malloc logging goes based on environment variables. By
// default, goes to stderr if it's a tty, and is otherwise dropped.