⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@bneradt
Copy link
Contributor

@bneradt bneradt commented Jan 13, 2026

No description provided.

Zero-initialize buffers that are written to disk to avoid Valgrind
reporting uninitialized bytes in write syscalls.

Stripe::_init_directory: The raw_dir buffer is allocated but not
initialized before being written to disk during cache sync operations.

LogBuffer: The buffer uses alignment for the header which can leave
uninitialized padding bytes between header strings and the data section.

test_RamCache: IOBufferData allocations were not initialized. When the
freelist recycles this memory for cache writes, Valgrind reported
uninitialized bytes in the pwrite syscall.

Valgrind reports fixed:

1. Stripe directory write:
   Syscall param pwrite64(buf) points to uninitialised byte(s)
      at AIOThreadInfo::aio_thread_main(AIOThreadInfo*)
      by Stripe::Stripe(CacheDisk*, long, long, int, int)

2. LogBuffer flush:
   Syscall param write(buf) points to uninitialised byte(s)
      at Log::flush_thread_main(void*)
      by LogBuffer::LogBuffer(LogConfig const*, LogObject*, ...)

3. Cache write from recycled RamCache buffers:
   Syscall param pwrite64(buf) points to uninitialised byte(s)
      at AIOThreadInfo::aio_thread_main(AIOThreadInfo*)
   Uninitialised value was created by a heap allocation
      at IOBufferData::alloc(long, AllocType)
      by test_RamCache(...)
@bneradt bneradt force-pushed the fix_crashing_stripe_test branch from d658b8a to a28fdf3 Compare January 13, 2026 20:41
@bneradt bneradt closed this Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant