Skip to content

Commit

Permalink
Fixing fuzzer test crash in route_fuzz_test.cc. (#32987)
Browse files Browse the repository at this point in the history
Signed-off-by: Yanjun Xiang <[email protected]>
  • Loading branch information
yanjunxiang-google authored Mar 20, 2024
1 parent 79c64c5 commit 1cfe7c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions test/common/router/route_fuzz_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ DEFINE_PROTO_FUZZER(const test::common::router::RouteTestCase& input) {
static NiceMock<Envoy::StreamInfo::MockStreamInfo> stream_info;
static NiceMock<Server::Configuration::MockServerFactoryContext> factory_context;
static ScopedInjectableLoader<Regex::Engine> engine(std::make_unique<Regex::GoogleReEngine>());
static ScopedInjectableLoader<ThreadLocal::SlotAllocator> tls_inject(
std::make_unique<ThreadLocal::MockInstance>());
static ScopedInjectableLoader<Api::Api> api_inject(std::make_unique<Api::MockApi>());

try {
if (!validateConfig(input)) {
return;
Expand Down

0 comments on commit 1cfe7c9

Please sign in to comment.