UBSan errors: perf_level and iostats_context
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
running make blackbox_ubsan_crash_test on rocksdb v7.2.2 results in the following errors:
monitoring/perf_step_timer.h:19:31: runtime error: load of null pointer of type 'PerfLevel'
file/writable_file_writer.cc:523:9: runtime error: member access within null pointer of type 'struct IOStatsContext'
seems like these variables are not initialized when reached.
accessing the members through a getter instead of directly fixes these errors. e.g. GetPerfLevel() instead of perf_level directly.
perf_context is declared and defined in a very similar way (though with thread_local instead of __thread) but no error is raised from it. thats probably just a coincidence where the first access to perf_context is through get_perf_context() and the rest already see an initialized member.
### Steps to reproduce the behavior
make blackbox_ubsan_crash_test
Contributor guide
Assessment
This issue has not been assessed yet.