Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UBSan errors: perf_level and iostats_context #10205

Open
Yuval-Ariel opened this issue Jun 20, 2022 · 1 comment
Open

UBSan errors: perf_level and iostats_context #10205

Yuval-Ariel opened this issue Jun 20, 2022 · 1 comment
Assignees
Labels
bug Confirmed RocksDB bugs

Comments

@Yuval-Ariel
Copy link

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

@hx235
Copy link
Contributor

hx235 commented Jun 21, 2022

Yeah it failed on the latest rocksdb version too. I need to take a look

@hx235 hx235 self-assigned this Jun 21, 2022
@hx235 hx235 added the bug Confirmed RocksDB bugs label Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed RocksDB bugs
Projects
None yet
Development

No branches or pull requests

2 participants