[build] Fix undefined behavour sanitizer (#16375)

* [build] Fix integer overflow runtime error for core part

Temporarily remove circle ci UBSAN build precondition

* [build] Enable all of the ubsans

[build] Check runtime error

[build] Update UBSAN_OPTION

* [build] Add UBSAN blacklist

[build] Ignore system libraries

[build] Ignore vendor library

* [build] Fix implicit conversion runtime error in core

* [build] Fix division by zero runtime error

* [build] Add unfixed error to ubsan blacklist

* [build] Make UBSAN halt on error

Revert "Temporary remove build precondition"

* [build] Fix division by zero error

* [build] Make UBSAN officially work without FIXME prefix

* [build] Fix implicit conversion from int64_t to uint64_t

* [build] Rename style test json file name

* Address review findings
This commit is contained in:
zmiao
2020-04-07 16:30:30 +03:00
committed by GitHub
parent 8986b558eb
commit bf4c7340f3
21 changed files with 110 additions and 51 deletions

View File

@@ -34,7 +34,7 @@ static std::shared_ptr<std::string> randomString(size_t size) {
std::mt19937 random;
for (size_t i = 0; i < size; i++) {
(*result)[i] = random();
(*result)[i] = static_cast<char>(random());
}
return result;