stats: Avoid asserts in fuzz-tests by eliminating arbitrary length limits, using the new MemBlock wrapper for memcpy#8779
Conversation
Signed-off-by: Joshua Marantz <jmarantz@google.com>
htuch
left a comment
There was a problem hiding this comment.
Thanks, curious what enforces the stat name limits.
|
|
||
| if (str.size() >= StatNameMaxSize) { | ||
| size_t halfway = str.size() / 2; | ||
| addSymbol(pool, symbol_table, str.substr(0, halfway)); |
There was a problem hiding this comment.
No need to have this kind of smart logic; if you just cap the string at StatNameMaxSize, the fuzzer will be able to do what is implied in this logic if it is helpful to the exploration.
There was a problem hiding this comment.
I'm changing the symbol-table impl to simply not have this limit, which should simplify fuzzing. It works I think but still not quite ready for review. Will ping again when ready.
There was a problem hiding this comment.
This is ready for review now.
…, or on the length of a fake-symbol table stat-name. Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
…es or symbols. it's bytes. Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
|
ready for review now |
Signed-off-by: Joshua Marantz <jmarantz@google.com>
|
/azp run envoy-macos |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
…ass. Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
…xy#8779). Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
|
/retest |
|
🔨 rebuilding |
asraa
left a comment
There was a problem hiding this comment.
This LGTM from the fuzzing / test utility side now
|
Over to @mattklein123 for senior maintainer review. Thank you! |
| #endif | ||
| } | ||
|
|
||
| // TODO(jmarantz): this utility is intended to be costs both for unit tests |
There was a problem hiding this comment.
"costs both"? Feel free to fix in a follow up.
* master: (167 commits) stats: Avoid asserts in fuzz-tests by eliminating arbitrary length limits, using the new MemBlock wrapper for memcpy (envoyproxy#8779) Make %UPSTREAM_LOCAL_ADDRESS% access-log format work for HTTP requests. (envoyproxy#9362) tools: API boosting support for using decls and enum constants. (envoyproxy#9418) Fix incorrect cluster InitializePhase type (envoyproxy#9379) build: fix merge race between envoyproxy#9241 and envoyproxy#9413. (envoyproxy#9427) fuzz: fix incorrect evaluator test (envoyproxy#9402) server: fix bogus startup log message (envoyproxy#9404) tools: Add protoxform tests (envoyproxy#9241) api: options after import (envoyproxy#9413) misc: use std::move instead of constructing a copy (envoyproxy#9415) tools: API boosting support for rewriting elaborated types. (envoyproxy#9375) docs: fix invalid transport_socket value (envoyproxy#9403) fix typo in docs (envoyproxy#9394) srds: remove to-de-removed scopes first and then apply additions to avoid scope key conflict. (envoyproxy#9366) api: generate whole directory and sync (envoyproxy#9382) bazel: Add load statements for proto_library (envoyproxy#9367) Fix typo (envoyproxy#9388) Correct test of OptionsImpl argc type (Was: Correct type for std::array size() result) (envoyproxy#9290) http1 encode trailers in chunk encoding (envoyproxy#8667) Add mode to PipeInstance (envoyproxy#8423) ...
…(discovered in envoyproxy#8779). (envoyproxy#9360) * Add test for release(), which was not working (discovered in envoyproxy#8779). Signed-off-by: Joshua Marantz <jmarantz@google.com> Signed-off-by: Prakhar <prakhar_au@yahoo.com>
…mits, using the new MemBlock wrapper for memcpy (envoyproxy#8779) * Avoid crashes in fuzz-tests due to input strings being too long. Signed-off-by: Joshua Marantz <jmarantz@google.com> Signed-off-by: Prakhar <prakhar_au@yahoo.com>
Description: Stats have a reasonably generous hard limit of 64k bytes per "."-separated segment. However fuzzing is evidently happy to make longer strings, based on the fuzz crash report
This change also has the benefit of further reducing memory use; see gold-file updates in the PR.
Risk Level: low
Testing: just this one fuzz test
Docs Changes: n/a
Release Notes: n/a