Skip to content

Commit

Permalink
Fix the checker fuzzer. (#165)
Browse files Browse the repository at this point in the history
EXIT() needs to be defined in `checker.so`, not in the binary that
`dlopen`s it.
  • Loading branch information
veluca93 authored Jun 8, 2023
1 parent 5b2eab2 commit 7e4efba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/tools/fuzz_checker/checker_header.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
#define _exit EXIT
#define exit EXIT

[[noreturn]] void EXIT(int status);
struct Exit {
int status;
};

[[noreturn]] inline void EXIT(int status) { throw Exit{status}; }
2 changes: 0 additions & 2 deletions src/tools/fuzz_checker/fuzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ struct Exit {
int status;
};

[[noreturn]] void EXIT(int status) { throw Exit{status}; }

#ifndef NUM_INPUTS
#error Missing NUM_INPUTS
#endif
Expand Down

0 comments on commit 7e4efba

Please sign in to comment.