Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ format changes.

## [Unreleased]

### Fixed

- **`check_decode`'s `Tree` has `branches` and `tags`** (protowire#449).
Without them the PB leg skipped both fields as unknown, so the corpus's
map-depth rows could not reach the decoder's map path. The decoders
needed no change: they already count a map's `{` and every PB map entry
toward `MaxNestingDepth`.

### Changed

- **The vendored shared schemas are re-synced with [trendvidia/protos](https://github.com/trendvidia/protos) v0.1.2** ([trendvidia/protowire#447](https://github.com/trendvidia/protowire/issues/447)). They gain protos' file options, and `envelope.proto`'s `go_package` now names a published package. Declarations and field numbers are unchanged, and so is this port's public API.
Expand Down
9 changes: 8 additions & 1 deletion cmd/check_decode/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <cstring>
#include <filesystem>
#include <fstream>
#include <map>
#include <memory>
#include <span>
#include <sstream>
Expand Down Expand Up @@ -111,10 +112,16 @@ struct Tree {
std::unique_ptr<Tree> child;
std::string label;
std::vector<Tree> children;
// Held by pointer so the map's value type is complete here, where the
// standard requires it; the wire form is the same as map<string, Tree>.
std::map<std::string, std::unique_ptr<Tree>> branches;
std::map<std::string, std::string> tags;
PROTOWIRE_FIELDS(Tree,
PROTOWIRE_FIELD(1, child),
PROTOWIRE_FIELD(2, label),
PROTOWIRE_FIELD(3, children))
PROTOWIRE_FIELD(3, children),
PROTOWIRE_FIELD(4, branches),
PROTOWIRE_FIELD(5, tags))
};

struct StringHolder {
Expand Down
Loading