mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
30b912fc81
This adds a fuzzer for at_pointer() which recently had a bug. The #1142 bug had been found with this fuzzer Also, it polishes the github action job: cross pollinate the fuzzer corpora (lets fuzzers reuse results from other fuzzers) use github action syntax instead of bash checks only run on push if on master
18 lines
463 B
C++
18 lines
463 B
C++
#ifndef SIMDJSON_FUZZUTILS_H
|
|
#define SIMDJSON_FUZZUTILS_H
|
|
|
|
#include <cstdint>
|
|
|
|
// view data as a byte pointer
|
|
template <typename T> inline const std::uint8_t* as_bytes(const T* data) {
|
|
return static_cast<const std::uint8_t*>(static_cast<const void*>(data));
|
|
}
|
|
|
|
// view data as a char pointer
|
|
template <typename T> inline const char* as_chars(const T* data) {
|
|
return static_cast<const char*>(static_cast<const void*>(data));
|
|
}
|
|
|
|
|
|
#endif // SIMDJSON_FUZZUTILS_H
|