aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_fuchsia.h
diff options
context:
space:
mode:
authorSuraj K Suresh <kssuraj15@gmail.com>2020-09-28 14:48:39 +0530
committerDmitry Vyukov <dvyukov@google.com>2020-10-03 14:17:26 +0200
commitca27b3bc5783ce1dbda7f23883d0ddf3729902a8 (patch)
tree7a8b2516093aafd5c1ce9f89fc3aaf833cbdc163 /executor/common_fuchsia.h
parent2653fa43f8cced3279808d74e5f712bf45ef7551 (diff)
executor: msvc support syz-executor
Diffstat (limited to 'executor/common_fuchsia.h')
-rw-r--r--executor/common_fuchsia.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/executor/common_fuchsia.h b/executor/common_fuchsia.h
index 2d76891da..6576e83f0 100644
--- a/executor/common_fuchsia.h
+++ b/executor/common_fuchsia.h
@@ -126,13 +126,16 @@ static void install_segv_handler(void)
}
#define NONFAILING(...) \
- { \
+ ({ \
+ int ok = 1; \
__atomic_fetch_add(&skip_segv, 1, __ATOMIC_SEQ_CST); \
if (sigsetjmp(segv_env, 0) == 0) { \
__VA_ARGS__; \
- } \
+ } else \
+ ok = 0; \
__atomic_fetch_sub(&skip_segv, 1, __ATOMIC_SEQ_CST); \
- }
+ ok; \
+ })
#endif
#if SYZ_EXECUTOR || SYZ_THREADED