Skip to content

Conversation

@bneradt
Copy link
Contributor

@bneradt bneradt commented Jan 9, 2026

Valgrind reported a conditional jump depending on an uninitialized value in Log::periodic_tasks(). The root cause was that roll_log_files_now was not initialized in LogConfig. While we're at it, I'm initializing m_partition_space_left in the member declaration as well.

Fixed by adding default member initializers in the class definition, consistent with the other members.

Valgrind report that reported this:

  Thread 30 [LOG_FLUSH]:
  Conditional jump or move depends on uninitialised value(s)
     at 0x68F310: Log::periodic_tasks(long)
     by 0x6901FF: Log::flush_thread_main(void*)
     by 0x695FEC: LoggingFlushContinuation::mainEvent(int, void*)
     by 0x883EA2: EThread::execute()
     by 0x87FD61: spawn_thread_internal(void*)
   Uninitialised value was created by a heap allocation
     at 0x4C2A593: operator new(unsigned long)
     by 0x695440: Log::init(int)

Valgrind reported a conditional jump depending on an uninitialized value
in Log::periodic_tasks(). The root cause was that roll_log_files_now was
not initialized in LogConfig. While we're at it, I'm initializing
m_partition_space_left in the member declaration as well.

Fixed by adding default member initializers in the class definition,
consistent with the other members.

Valgrind report that reported this:

  Thread 30 [LOG_FLUSH]:
  Conditional jump or move depends on uninitialised value(s)
     at 0x68F310: Log::periodic_tasks(long)
     by 0x6901FF: Log::flush_thread_main(void*)
     by 0x695FEC: LoggingFlushContinuation::mainEvent(int, void*)
     by 0x883EA2: EThread::execute()
     by 0x87FD61: spawn_thread_internal(void*)
   Uninitialised value was created by a heap allocation
     at 0x4C2A593: operator new(unsigned long)
     by 0x695440: Log::init(int)
@bneradt bneradt added this to the 10.2.0 milestone Jan 9, 2026
@bneradt bneradt self-assigned this Jan 9, 2026
Copy link
Contributor

@cmcfarlen cmcfarlen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if coverity found this?

@bneradt
Copy link
Contributor Author

bneradt commented Jan 12, 2026

Thanks for the review.

I wonder if coverity found this?

Maybe coverity could have found it? I found it via the valgrind run I mentioned in the description while trying to track down a different issue.

@bneradt bneradt merged commit 05f06fa into apache:master Jan 12, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants