Some checks reported errors
Tests / Clang total: 1096, passed: 1096
Clang |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / Release [gcc] total: 1096, passed: 1096
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 824, passed: 824
weaselab/conflict-set/pipeline/head Something is wrong with the build of this commit
Closes #2
27 lines
601 B
C++
27 lines
601 B
C++
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <fstream>
|
|
#include <sstream>
|
|
#include <thread>
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
|
|
|
|
int main(int argc, char **argv) {
|
|
auto doTest = [&]() {
|
|
for (int i = 1; i < argc; ++i) {
|
|
std::ifstream t(argv[i], std::ios::binary);
|
|
std::stringstream buffer;
|
|
buffer << t.rdbuf();
|
|
auto str = buffer.str();
|
|
LLVMFuzzerTestOneInput((const uint8_t *)str.data(), str.size());
|
|
}
|
|
};
|
|
#ifdef THREAD_TEST
|
|
std::thread thread2{doTest};
|
|
#endif
|
|
doTest();
|
|
#ifdef THREAD_TEST
|
|
thread2.join();
|
|
#endif
|
|
}
|