diff options
author | Yichao Yu <yyc1992@gmail.com> | 2017-10-31 11:41:51 -0400 |
---|---|---|
committer | Dave Watson <davejwatson@fb.com> | 2017-10-31 08:41:51 -0700 |
commit | 26c99a3a3e1d07bc58f68d5311697a39a5a6ae7f (patch) | |
tree | 17d65f2c5569f4cb9289b40ab8a77e961b5fcaf9 /tests/Ltest-init-local-signal-lib.c | |
parent | b9fe811de958d605394f243e950fd8fcf0d3441e (diff) | |
download | libunwind-26c99a3a3e1d07bc58f68d5311697a39a5a6ae7f.tar.gz |
Fix init-local-signal test (#50)
* Add `SA_SIGINFO` flag
This is needed to guarantee the availability of the `ucontext` argument
* Mark the `NULL` pointer load as `volatile`
Further prevent any compiler optimization on the load.
Diffstat (limited to 'tests/Ltest-init-local-signal-lib.c')
-rw-r--r-- | tests/Ltest-init-local-signal-lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/Ltest-init-local-signal-lib.c b/tests/Ltest-init-local-signal-lib.c index 45c0e7c1..7474f71f 100644 --- a/tests/Ltest-init-local-signal-lib.c +++ b/tests/Ltest-init-local-signal-lib.c @@ -1,6 +1,6 @@ #include <stdio.h> /* To prevent inlining and optimizing away */ -int foo(int* f) { +int foo(volatile int* f) { return *f; } |