Module Name: src
Committed By: kre
Date: Wed Aug 22 12:14:29 UTC 2018
Modified Files:
src/sys/sys: asan.h
Log Message:
Temporarily disable the dummy inline funcs, and replace them with
__nothing until maxv sorts out the type issues - kern_malloc()
(for historical reasons) takes an unsigned long parameter, not a
size_t - on 64 bit arch's this makes no difference (size_t is unsigned
long) but that's not true on 32 bit archs (or not all of them anyway).
This should unbreak the i386 build (others?) - hopefully without
damaging anything too badly. Note the type issues need fixing,
just making this change permanent is not the solution.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/sys/asan.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/asan.h
diff -u src/sys/sys/asan.h:1.4 src/sys/sys/asan.h:1.5
--- src/sys/sys/asan.h:1.4 Wed Aug 22 11:55:28 2018
+++ src/sys/sys/asan.h Wed Aug 22 12:14:29 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: asan.h,v 1.4 2018/08/22 11:55:28 martin Exp $ */
+/* $NetBSD: asan.h,v 1.5 2018/08/22 12:14:29 kre Exp $ */
/*
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -39,6 +39,8 @@ void kasan_add_redzone(size_t *);
void kasan_alloc(const void *, size_t, size_t);
void kasan_free(const void *, size_t);
#else
+#if 0
+/* there are type issues - kmem_alloc() takes a u_long size not size_t */
static void __inline __unused
kasan_add_redzone(size_t *size __unused)
{
@@ -57,6 +59,11 @@ kasan_free(const void *addr __unused, si
{
/* nothing */
}
+#else
+#define kasan_add_redzone(SP) __nothing
+#define kasan_alloc(P, S1, S2) __nothing
+#define kasan_free(P, S) __nothing
+#endif
#endif
#endif /* !_SYS_ASAN_H_ */