Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6d6688f

Browse files
committed
Changes to work with upstream CPython
1 parent 03df2b6 commit 6d6688f

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

fuzzer.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#include <optional>
99
#include <Python.h>
1010

11-
#include "python_coverage.h"
12-
1311
#ifndef PYTHON_HARNESS_PATH
1412
#error "Define PYTHON_HARNESS_PATH"
1513
#endif

python_coverage.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#pragma once
2+
#include <stdint.h>
3+
#include <stddef.h>
24

35
#define COVERAGE_ARRAY_SIZE 65536
46

5-
extern "C" {
6-
__attribute__((section("__libfuzzer_extra_counters")))
7-
uint8_t coverage_counter[COVERAGE_ARRAY_SIZE];
8-
}
7+
__attribute__((section("__libfuzzer_extra_counters")))
8+
uint8_t coverage_counter[COVERAGE_ARRAY_SIZE];
99

10-
extern "C" void global_record_code_coverage(void* codeptr, int lasti)
10+
void fuzzer_record_code_coverage(void* codeptr, int lasti)
1111
{
1212
coverage_counter[ ((size_t)(codeptr) ^ (size_t)(lasti)) % COVERAGE_ARRAY_SIZE ] = 1;
1313
}

0 commit comments

Comments
 (0)