// Path and command-line shapes over arbitrary bytes: never crash, bounded, // path_template idempotent (learn/tokenize.hpp). #include "strawberry/learn/tokenize.hpp" #include #include using namespace strawberry::learn; extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { const std::string_view in(reinterpret_cast(data), size); const auto t = path_template(in); if (t.size() > kMaxShapeBytes || path_template(t) != t) __builtin_trap(); if (cmdline_shape(in).size() > kMaxShapeBytes + 16) __builtin_trap(); (void) location_class(in); return 0; }