Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/gen Use volatile for explicit 0 dereference
details: https://anonhg.NetBSD.org/src/rev/295d7644c49c
branches: trunk
changeset: 765353:295d7644c49c
user: joerg <joerg%NetBSD.org@localhost>
date: Tue May 24 15:20:37 2011 +0000
description:
Use volatile for explicit 0 dereference
diffstat:
tests/lib/libc/gen/t_siginfo.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 39021c903165 -r 295d7644c49c tests/lib/libc/gen/t_siginfo.c
--- a/tests/lib/libc/gen/t_siginfo.c Tue May 24 14:27:07 2011 +0000
+++ b/tests/lib/libc/gen/t_siginfo.c Tue May 24 15:20:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_siginfo.c,v 1.10 2011/03/02 03:42:56 riz Exp $ */
+/* $NetBSD: t_siginfo.c,v 1.11 2011/05/24 15:20:37 joerg Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -224,7 +224,7 @@
switch ((child = fork())) {
case 0:
sleep(1);
- *(long *)0 = 0;
+ *(volatile long *)0 = 0;
atf_tc_fail("Child did not segfault");
/* NOTREACHED */
case -1:
@@ -403,7 +403,7 @@
sigemptyset(&sa.sa_mask);
sigaction(SIGSEGV, &sa, NULL);
- *(long *)0 = 0;
+ *(volatile long *)0 = 0;
atf_tc_fail("Test did not fault as expected");
}
Home |
Main Index |
Thread Index |
Old Index