diff --git a/Makefile b/Makefile index d840bd642..e8a00bb2d 100644 --- a/Makefile +++ b/Makefile @@ -527,6 +527,10 @@ PARALLEL_TEST = \ transaction_test \ write_prepared_transaction_test \ +# options_settable_test doesn't pass with UBSAN as we use hack in the test +ifdef COMPILE_WITH_UBSAN + TESTS := $(shell echo $(TESTS) | sed 's/\boptions_settable_test\b//g') +endif SUBSET := $(TESTS) ifdef ROCKSDBTESTS_START SUBSET := $(shell echo $(SUBSET) | sed 's/^.*$(ROCKSDBTESTS_START)/$(ROCKSDBTESTS_START)/') diff --git a/db/snapshot_impl.h b/db/snapshot_impl.h index ad9c1a9fb..185daa4e1 100644 --- a/db/snapshot_impl.h +++ b/db/snapshot_impl.h @@ -45,6 +45,10 @@ class SnapshotList { list_.prev_ = &list_; list_.next_ = &list_; list_.number_ = 0xFFFFFFFFL; // placeholder marker, for debugging + // Set all the variables to make UBSAN happy. + list_.list_ = nullptr; + list_.unix_time_ = 0; + list_.is_write_conflict_boundary_ = false; count_ = 0; }