blob: 4d9e551905913e74b77529ad27b58e6e8f4f4ca4 [file] [log] [blame]
Anestis Bechtsoudisd76c3b82015-12-26 17:35:25 +02001/*
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
Jagger3db1d952016-03-10 02:02:46 +010020#ifndef _HF_SANCOV_H_
21#define _HF_SANCOV_H_
Anestis Bechtsoudisd76c3b82015-12-26 17:35:25 +020022
Jagger00265602016-03-10 02:36:27 +010023/*
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
Jagger3db1d952016-03-10 02:02:46 +010038extern void sancov_Analyze(honggfuzz_t * hfuzz, fuzzer_t * fuzzer);
Jagger00265602016-03-10 02:36:27 +010039extern bool sancov_Init(honggfuzz_t * hfuzz);
Jagger2b97dc92016-03-10 04:28:18 +010040extern bool sancov_prepareExecve(honggfuzz_t * hfuzz);
Anestis Bechtsoudisd76c3b82015-12-26 17:35:25 +020041
Jagger3db1d952016-03-10 02:02:46 +010042#endif /* _HF_SANCOV_H_ */