Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Disable sanitizer instrumentation in x86_ho...
details: https://anonhg.NetBSD.org/src/rev/41f0d47e9969
branches: trunk
changeset: 451591:41f0d47e9969
user: kamil <kamil%NetBSD.org@localhost>
date: Tue May 28 13:20:23 2019 +0000
description:
Disable sanitizer instrumentation in x86_hotpatch()
Local variables have empty (0-sized), unknown alignment to UBSan.
This is hard to workaround without mutating the code too much.
diffstat:
sys/arch/x86/x86/patch.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 26c97b2b63de -r 41f0d47e9969 sys/arch/x86/x86/patch.c
--- a/sys/arch/x86/x86/patch.c Tue May 28 10:14:46 2019 +0000
+++ b/sys/arch/x86/x86/patch.c Tue May 28 13:20:23 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: patch.c,v 1.35 2018/07/14 14:34:32 maxv Exp $ */
+/* $NetBSD: patch.c,v 1.36 2019/05/28 13:20:23 kamil Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: patch.c,v 1.35 2018/07/14 14:34:32 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: patch.c,v 1.36 2019/05/28 13:20:23 kamil Exp $");
#include "opt_lockdebug.h"
#ifdef i386
@@ -132,6 +132,12 @@
}
}
+/* The local variables have unknown alignment to UBSan */
+#if defined(__clang__)
+__attribute__((no_sanitize("undefined")))
+#else
+__attribute__((no_sanitize_undefined))
+#endif
void
x86_hotpatch(uint32_t name, const uint8_t *bytes, size_t size)
{
Home |
Main Index |
Thread Index |
Old Index