Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/common/stats/stat_merger_fuzz_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void testDynamicEncoding(absl::string_view data, SymbolTable& symbol_table) {
// TODO(#10008): We should remove the "1 +" below, so we can get empty
// segments, which trigger some inconsistent handling as described in that
// bug.
uint32_t num_bytes = 1 + data[index] & 0x7;
uint32_t num_bytes = (1 + data[index]) & 0x7;

@antoniovicente antoniovicente May 11, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmarantz

If you look at the comment above, I think the intent of this line was:
uint32_t num_bytes = 1 + (data[index] & 0x7);

@twghu twghu May 11, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to initial byte count has resolved fuzz crash 30088 and removed need for additional testing of num_bytes.

num_bytes = std::min(static_cast<uint32_t>(data.size() - 1),
num_bytes); // restrict number up to the size of data

Expand Down
6 changes: 3 additions & 3 deletions test/extensions/filters/http/common/fuzz/filter_fuzz_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ namespace Extensions {
namespace HttpFilters {

DEFINE_PROTO_FUZZER(const test::extensions::filters::http::FilterFuzzTestCase& input) {
static PostProcessorRegistration reg = {[](test::extensions::filters::http::FilterFuzzTestCase*
input,
unsigned int seed) {
static PostProcessorRegistration reg __attribute__((
Comment thread
dmitri-d marked this conversation as resolved.
Outdated
unused)) = {[](test::extensions::filters::http::FilterFuzzTestCase* input,
unsigned int seed) {
// This ensures that the mutated configs all have valid filter names and type_urls. The list of
// names and type_urls is pulled from the NamedHttpFilterConfigFactory. All Envoy extensions are
// built with this test (see BUILD file).
Expand Down
2 changes: 2 additions & 0 deletions test/server/filter_chain_benchmark_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ const char YamlSingleDstPortBottom[] = R"EOF(

class FilterChainBenchmarkFixture : public benchmark::Fixture {
public:
using benchmark::Fixture::SetUp;

void SetUp(::benchmark::State& state) override {
int64_t input_size = state.range(0);
std::vector<std::string> port_chains;
Expand Down