Commit f56b2fe
committed
Fix MemorySanitizer Warning by Reordering Member Variables in KafkaHandleBase
The MemorySanitizer detected a use-of-uninitialized-value issue caused by the
destruction order in KafkaHandleBase. Specifically, the deleter of the Kafka
handle accessed destroy_flags_ after it had been destroyed because destroy_flags_
was declared after handle_.
This commit reorders the member declarations so that destroy_flags_ is declared
before handle_. The constructor's initializer list is also updated accordingly
to match the new declaration order.1 parent 9c5ea0e commit f56b2fe
File tree
2 files changed
+2
-2
lines changed- include/cppkafka
- src
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
395 | 394 | | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments