Skip to content

Commit

Permalink
Update ChannelBuffer.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
geier1993 authored Dec 6, 2023
1 parent 202318f commit 6d3518a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/eckit/log/ChannelBuffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void ChannelBuffer::reset() {

bool ChannelBuffer::dumpBuffer() {
// When setting and using pointers we should have boundary checks. In a multi threaded environment we already have experienced weird behaviour.
// With thiese checks the race conditions are not gone but they won't cause any segfaults. See https://github.com/ecmwf/eckit/issues/89
// With these checks the race conditions are not gone but they won't cause any segfaults. See https://github.com/ecmwf/eckit/issues/89
if (target_) {
// Explicitly check that `pptr()` is not larger than end of buffer. Racecondition can end up adding larger values.
target_->write(buffer_.data(), std::min(pptr(), buffer_.data() + buffer_.size()));
Expand Down

0 comments on commit 6d3518a

Please sign in to comment.