Skip to content
Open
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
3 changes: 3 additions & 0 deletions src/iocore/cache/CacheTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ test_RamCache(RegressionTest *t, RamCache *cache, const char *name, int64_t cach
CryptoHash hash;

d->alloc(BUFFER_SIZE_INDEX_16K);
memset(d->data(), 0, BUFFER_SIZE_FOR_INDEX(BUFFER_SIZE_INDEX_16K));
data.push_back(make_ptr(d));
hash.u64[0] = (static_cast<uint64_t>(i) << 32) + i;
hash.u64[1] = (static_cast<uint64_t>(i) << 32) + i;
Expand Down Expand Up @@ -610,6 +611,7 @@ test_RamCache(RegressionTest *t, RamCache *cache, const char *name, int64_t cach
if (!cache->get(&hash, &get_data)) {
IOBufferData *d = THREAD_ALLOC(ioDataAllocator, this_thread());
d->alloc(BUFFER_SIZE_INDEX_16K);
memset(d->data(), 0, d->block_size());
data.push_back(make_ptr(d));
cache->put(&hash, data.back().get(), 1 << 15);
if (i >= sample_size / 2) {
Expand All @@ -630,6 +632,7 @@ test_RamCache(RegressionTest *t, RamCache *cache, const char *name, int64_t cach
if (!cache->get(&hash, &get_data)) {
IOBufferData *d = THREAD_ALLOC(ioDataAllocator, this_thread());
d->alloc(BUFFER_SIZE_INDEX_8K + (r[i] % 3));
memset(d->data(), 0, d->block_size());
data.push_back(make_ptr(d));
cache->put(&hash, data.back().get(), d->block_size());
if (i >= sample_size / 2) {
Expand Down
2 changes: 2 additions & 0 deletions src/proxy/logging/LogBuffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ LogBuffer::LogBuffer(const LogConfig *cfg, LogObject *owner, size_t size, size_t
}
m_buffer = static_cast<char *>(align_pointer_forward(m_unaligned_buffer, buf_align));

memset(m_buffer, 0, size);

// add the header
hdr_size = _add_buffer_header(cfg);

Expand Down