Commit 05f06fa
authored
Fix uninitialized LogConfig member variable (#12798)
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)1 parent dbff9de commit 05f06fa
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | | - | |
| 166 | + | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| |||
0 commit comments