Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/sys Disable UBSan warnings for trigger_segv()



details:   https://anonhg.NetBSD.org/src/rev/49e4e250e762
branches:  trunk
changeset: 744811:49e4e250e762
user:      kamil <kamil%NetBSD.org@localhost>
date:      Thu Feb 13 13:38:44 2020 +0000

description:
Disable UBSan warnings for trigger_segv()

Dereferencing the NULL pointer is on purpose.

diffstat:

 tests/lib/libc/sys/t_ptrace_wait.h |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r ab1e3ae2e315 -r 49e4e250e762 tests/lib/libc/sys/t_ptrace_wait.h
--- a/tests/lib/libc/sys/t_ptrace_wait.h        Thu Feb 13 13:34:47 2020 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.h        Thu Feb 13 13:38:44 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.h,v 1.20 2020/02/13 13:34:47 kamil Exp $ */
+/*     $NetBSD: t_ptrace_wait.h,v 1.21 2020/02/13 13:38:44 kamil Exp $ */
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -606,6 +606,11 @@
 #endif
 }
 
+#if defined(__clang__)
+__attribute__((no_sanitize("undefined")))
+#else
+__attribute__((no_sanitize_undefined))
+#endif
 static void __used
 trigger_segv(void)
 {



Home | Main Index | Thread Index | Old Index