diff options
| author | thorpej <thorpej@NetBSD.org> | 2021-11-23 23:29:55 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2021-11-23 23:29:55 +0000 |
| commit | d647f0760138cd669ee13293fdce2ea2a8094efc (patch) | |
| tree | 5af0880d502a353dc81516ca2520550bd5f009d8 /tests/lib | |
| parent | 591b30edffd8cc4de012e8f1d1f882a6485ccf39 (diff) | |
Temporary hack to work around incorrect/missing unwind info for
the t_sig_backtrace test case on ARM when compiled with optimization.
Diffstat (limited to 'tests/lib')
| -rw-r--r-- | tests/lib/libexecinfo/Makefile | 8 | ||||
| -rw-r--r-- | tests/lib/libexecinfo/t_sig_backtrace.c | 13 |
2 files changed, 18 insertions, 3 deletions
diff --git a/tests/lib/libexecinfo/Makefile b/tests/lib/libexecinfo/Makefile index d3d711e012f..2dde350d21d 100644 --- a/tests/lib/libexecinfo/Makefile +++ b/tests/lib/libexecinfo/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2021/11/18 15:03:19 thorpej Exp $ +# $NetBSD: Makefile,v 1.8 2021/11/23 23:29:55 thorpej Exp $ .include <bsd.own.mk> @@ -13,4 +13,10 @@ DPADD+= ${LIBEXECINFO} ${LIBELF} COPTS.t_backtrace.c= -Wno-stack-protector +# XXX temporary hack +.if ${MACHINE_CPU} == "arm" +COPTS.t_sig_backtrace.c=-fno-omit-frame-pointer +CPPFLAGS.t_sig_backtrace.c=-DNOINLINE_HACK +.endif + .include <bsd.test.mk> diff --git a/tests/lib/libexecinfo/t_sig_backtrace.c b/tests/lib/libexecinfo/t_sig_backtrace.c index b57316b5f42..bf6811331ee 100644 --- a/tests/lib/libexecinfo/t_sig_backtrace.c +++ b/tests/lib/libexecinfo/t_sig_backtrace.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_sig_backtrace.c,v 1.1 2021/11/18 15:03:19 thorpej Exp $ */ +/* $NetBSD: t_sig_backtrace.c,v 1.2 2021/11/23 23:29:55 thorpej Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_sig_backtrace.c,v 1.1 2021/11/18 15:03:19 thorpej Exp $"); +__RCSID("$NetBSD: t_sig_backtrace.c,v 1.2 2021/11/23 23:29:55 thorpej Exp $"); #include <sys/mman.h> #include <execinfo.h> @@ -51,6 +51,10 @@ char *foo; static int the_loop(int); +#ifdef NOINLINE_HACK +volatile int noinline; +#endif + static int __noinline func1(int i) { @@ -85,6 +89,11 @@ the_loop(int i) i = func2(i); } +#ifdef NOINLINE_HACK + if (noinline) + vfork(); +#endif + return i; } |
