diff options
author | Carlos Chinchilla <cachinchilla@google.com> | 2021-09-07 16:36:22 -0700 |
---|---|---|
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2021-09-09 01:08:49 +0000 |
commit | 478d3f2aa08f6d4c1b7167d1e949c58b64317166 (patch) | |
tree | 35b0cddcfa077df460850eeffcc1c1fab939014e /pw_log_rpc | |
parent | c0cbc16ec823caa773c4d1a463dffea16240612f (diff) | |
download | pigweed-478d3f2aa08f6d4c1b7167d1e949c58b64317166.tar.gz |
pw_ring_buffer: Crash on corrupt buffer access
Crash when accessing a corrupt ring buffer since there is no general way
to recover and corrupt data is indicative of other major memory issues.
Remove user's expectancy of DataLoss errors and documentation in
comments and update comments where necessary.
Remove unused iterator class and status.
Change-Id: I75e64ceb17dd7013461f4034d1cfa13090017e64
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/59040
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Pigweed-Auto-Submit: Carlos Chinchilla <cachinchilla@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Diffstat (limited to 'pw_log_rpc')
-rw-r--r-- | pw_log_rpc/rpc_log_drain.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pw_log_rpc/rpc_log_drain.cc b/pw_log_rpc/rpc_log_drain.cc index 385b9e0dd..6c21286b4 100644 --- a/pw_log_rpc/rpc_log_drain.cc +++ b/pw_log_rpc/rpc_log_drain.cc @@ -87,8 +87,7 @@ RpcLogDrain::LogDrainState RpcLogDrain::EncodeOutgoingPacket( uint32_t drop_count = 0; Result<multisink::MultiSink::Drain::PeekedEntry> possible_entry = PeekEntry(log_entry_buffer_, drop_count); - if (possible_entry.status().IsResourceExhausted() || - possible_entry.status().IsDataLoss()) { + if (possible_entry.status().IsResourceExhausted()) { continue; } |