Anestis Bechtsoudis | d76c3b8 | 2015-12-26 17:35:25 +0200 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * honggfuzz - sanitizer coverage feedback parsing |
| 4 | * ----------------------------------------------- |
| 5 | * |
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 7 | * not use this file except in compliance with the License. You may obtain |
| 8 | * a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, software |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 15 | * implied. See the License for the specific language governing |
| 16 | * permissions and limitations under the License. |
| 17 | * |
| 18 | */ |
| 19 | |
Jagger | 3db1d95 | 2016-03-10 02:02:46 +0100 | [diff] [blame] | 20 | #ifndef _HF_SANCOV_H_ |
| 21 | #define _HF_SANCOV_H_ |
Anestis Bechtsoudis | d76c3b8 | 2015-12-26 17:35:25 +0200 | [diff] [blame] | 22 | |
Jagger | 0026560 | 2016-03-10 02:36:27 +0100 | [diff] [blame] | 23 | /* |
| 24 | * SIGABRT is not a monitored signal for Android OS, since it produces lots of useless |
| 25 | * crashes due to way Android process termination hacks work. As a result the sanitizer's |
| 26 | * 'abort_on_error' flag cannot be utilized since it invokes abort() internally. In order |
| 27 | * to not lose crashes a custom exitcode is registered and monitored. Since exitcode is a |
| 28 | * global flag, it's assumed that target is compiled with only one sanitizer enabled at a |
| 29 | * time. |
| 30 | */ |
| 31 | #define HF_MSAN_EXIT_CODE 103 |
| 32 | #define HF_ASAN_EXIT_CODE 104 |
| 33 | #define HF_UBSAN_EXIT_CODE 105 |
| 34 | |
| 35 | /* Prefix for sanitizer report files */ |
| 36 | #define kLOGPREFIX ".hf.san" |
| 37 | |
Jagger | 3db1d95 | 2016-03-10 02:02:46 +0100 | [diff] [blame] | 38 | extern void sancov_Analyze(honggfuzz_t * hfuzz, fuzzer_t * fuzzer); |
Jagger | 0026560 | 2016-03-10 02:36:27 +0100 | [diff] [blame] | 39 | extern bool sancov_Init(honggfuzz_t * hfuzz); |
Jagger | 2b97dc9 | 2016-03-10 04:28:18 +0100 | [diff] [blame] | 40 | extern bool sancov_prepareExecve(honggfuzz_t * hfuzz); |
Anestis Bechtsoudis | d76c3b8 | 2015-12-26 17:35:25 +0200 | [diff] [blame] | 41 | |
Jagger | 3db1d95 | 2016-03-10 02:02:46 +0100 | [diff] [blame] | 42 | #endif /* _HF_SANCOV_H_ */ |