Skip to content

Commit

Permalink
[mips][asan] Fix preinstalled_signal.cc test for mips
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Simon Dardis committed Sep 26, 2017
1 parent 4b2113a commit 5a14bc8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler-rt/test/asan/TestCases/Linux/preinstalled_signal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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];
};
Expand Down

0 comments on commit 5a14bc8

Please sign in to comment.