From 5a14bc84e189d3319e863cfc8777b16369d0b22c Mon Sep 17 00:00:00 2001 From: Simon Dardis Date: Tue, 26 Sep 2017 11:49:04 +0000 Subject: [PATCH] [mips][asan] Fix preinstalled_signal.cc test for mips Linux for mips has a non-standard layout for the kernel sigaction struct. Adjust the layout by the minimally amount to get the test to pass, as we don't require the usage of the restorer function. llvm-svn: 314200 --- compiler-rt/test/asan/TestCases/Linux/preinstalled_signal.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler-rt/test/asan/TestCases/Linux/preinstalled_signal.cc b/compiler-rt/test/asan/TestCases/Linux/preinstalled_signal.cc index 2beba4e..ac4ea93 100644 --- a/compiler-rt/test/asan/TestCases/Linux/preinstalled_signal.cc +++ b/compiler-rt/test/asan/TestCases/Linux/preinstalled_signal.cc @@ -32,8 +32,14 @@ void SigHandler(int signum) { handler = "TestSigHandler"; } void SigAction(int, siginfo_t *, void *) { handler = "TestSigAction"; } struct KernelSigaction { + +#if defined(__mips__) + unsigned long flags; + __sighandler_t handler; +#else __sighandler_t handler; unsigned long flags; +#endif void (*restorer)(); char unused[1024]; }; -- 2.7.4