Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/misc - revert previous to t_ubsan.c, it is de...
details: https://anonhg.NetBSD.org/src/rev/bb75dc257a58
branches: trunk
changeset: 448479:bb75dc257a58
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Feb 04 03:10:33 2019 +0000
description:
- revert previous to t_ubsan.c, it is desired behaviour. from kamil.
- use -Wno-int-in-bool-context instead
diffstat:
tests/lib/libc/misc/Makefile | 7 ++++++-
tests/lib/libc/misc/t_ubsan.c | 6 +++---
2 files changed, 9 insertions(+), 4 deletions(-)
diffs (46 lines):
diff -r 0387f9e42704 -r bb75dc257a58 tests/lib/libc/misc/Makefile
--- a/tests/lib/libc/misc/Makefile Mon Feb 04 03:01:52 2019 +0000
+++ b/tests/lib/libc/misc/Makefile Mon Feb 04 03:10:33 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2018/08/09 12:45:15 christos Exp $
+# $NetBSD: Makefile,v 1.3 2019/02/04 03:10:33 mrg Exp $
.include <bsd.own.mk>
@@ -27,4 +27,9 @@
COPTS.t_ubsan.c += -Wno-stack-protector
COPTS.t_ubsanxx.cpp += -Wno-stack-protector
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+COPTS.t_ubsan.c+= -Wno-int-in-bool-context
+COPTS.t_ubsanxx.cpp+= -Wno-int-in-bool-context
+.endif
+
.include <bsd.test.mk>
diff -r 0387f9e42704 -r bb75dc257a58 tests/lib/libc/misc/t_ubsan.c
--- a/tests/lib/libc/misc/t_ubsan.c Mon Feb 04 03:01:52 2019 +0000
+++ b/tests/lib/libc/misc/t_ubsan.c Mon Feb 04 03:10:33 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ubsan.c,v 1.2 2019/02/03 10:45:58 mrg Exp $ */
+/* $NetBSD: t_ubsan.c,v 1.3 2019/02/04 03:10:33 mrg Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2018\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_ubsan.c,v 1.2 2019/02/03 10:45:58 mrg Exp $");
+__RCSID("$NetBSD: t_ubsan.c,v 1.3 2019/02/04 03:10:33 mrg Exp $");
#include <sys/types.h>
#include <sys/wait.h>
@@ -376,7 +376,7 @@
volatile int a = INT_MAX;
volatile int b = atoi("2");
- raise((a && b) ? SIGSEGV : SIGBUS);
+ raise((a * b) ? SIGSEGV : SIGBUS);
}
UBSAN_TC_BODY(mul_overflow_signed, tc)
Home |
Main Index |
Thread Index |
Old Index