Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libexecinfo t_sig_backtrace: Pacify vfork clobber ...
details: https://anonhg.NetBSD.org/src/rev/fa29755715fe
branches: trunk
changeset: 368667:fa29755715fe
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Jul 25 22:43:01 2022 +0000
description:
t_sig_backtrace: Pacify vfork clobber warning with volatile.
diffstat:
tests/lib/libexecinfo/t_sig_backtrace.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (42 lines):
diff -r 9cc3e498b686 -r fa29755715fe tests/lib/libexecinfo/t_sig_backtrace.c
--- a/tests/lib/libexecinfo/t_sig_backtrace.c Mon Jul 25 22:37:37 2022 +0000
+++ b/tests/lib/libexecinfo/t_sig_backtrace.c Mon Jul 25 22:43:01 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sig_backtrace.c,v 1.5 2022/07/25 22:37:37 riastradh Exp $ */
+/* $NetBSD: t_sig_backtrace.c,v 1.6 2022/07/25 22:43:01 riastradh Exp $ */
/*-
* Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_sig_backtrace.c,v 1.5 2022/07/25 22:37:37 riastradh Exp $");
+__RCSID("$NetBSD: t_sig_backtrace.c,v 1.6 2022/07/25 22:43:01 riastradh Exp $");
#include <sys/mman.h>
#include <execinfo.h>
@@ -83,8 +83,10 @@
}
static int __noinline
-the_loop_deref(int i)
+the_loop_deref(int i0)
{
+ volatile int i = i0;
+
while (*foo != 0) {
i = func3(i);
i = func1(i);
@@ -100,8 +102,10 @@
}
static int __noinline
-the_loop_jump(int i)
+the_loop_jump(int i0)
{
+ volatile int i = i0;
+
while ((*bar)() != 0) {
i = func3(i);
i = func1(i);
Home |
Main Index |
Thread Index |
Old Index