-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Configure Undefined Behaviour Sanitizer #6290
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,11 +45,12 @@ class OSRMBaseLoader{ | |
var retryCount = 0; | ||
let retry = (err) => { | ||
if (err) { | ||
if (retryCount < 10) { | ||
if (retryCount < this.scope.OSRM_CONNECTION_RETRIES) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could also add some exponential back-off, which might be more robust to fluctuations in CI startup times. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added |
||
const timeoutMs = 10 * Math.pow(this.scope.OSRM_CONNECTION_EXP_BACKOFF_COEF, retryCount); | ||
retryCount++; | ||
setTimeout(() => { tryConnect(this.scope.OSRM_IP, this.scope.OSRM_PORT, retry); }, 10); | ||
setTimeout(() => { tryConnect(this.scope.OSRM_IP, this.scope.OSRM_PORT, retry); }, timeoutMs); | ||
} else { | ||
callback(new Error("Could not connect to osrm-routed after ten retries.")); | ||
callback(new Error(`Could not connect to osrm-routed after ${this.scope.OSRM_CONNECTION_RETRIES} retries.`)); | ||
} | ||
} | ||
else | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,8 +69,7 @@ struct ExtractorConfig final : storage::IOConfig | |
".osrm.icd", | ||
".osrm.cnbg", | ||
".osrm.cnbg_to_ebg", | ||
".osrm.maneuver_overrides"}), | ||
requested_num_threads(0), parse_conditionals(false), use_locations_cache(true) | ||
".osrm.maneuver_overrides"}) | ||
{ | ||
} | ||
|
||
|
@@ -84,14 +83,12 @@ struct ExtractorConfig final : storage::IOConfig | |
std::vector<boost::filesystem::path> location_dependent_data_paths; | ||
std::string data_version; | ||
|
||
unsigned requested_num_threads; | ||
unsigned small_component_size; | ||
unsigned requested_num_threads = 0; | ||
unsigned small_component_size = 1000; | ||
|
||
bool generate_edge_lookup; | ||
|
||
bool use_metadata; | ||
bool parse_conditionals; | ||
bool use_locations_cache; | ||
bool use_metadata = false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious why usual compiler warnings didn't catch that 🤔 |
||
bool parse_conditionals = false; | ||
bool use_locations_cache = true; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Values are chosen as default values we use in program_options. |
||
}; | ||
} // namespace extractor | ||
} // namespace osrm | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
enum:include/tbb/pipeline.h | ||
vptr:src/util/log.cpp | ||
vptr:include/tbb/task.h | ||
vptr:include/tbb/parallel_reduce.h | ||
vptr:include/boost/smart_ptr/detail/shared_count.hpp | ||
vptr:include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp | ||
vptr:include/boost/program_options/variables_map.hpp | ||
vptr:include/boost/program_options/value_semantic.hpp | ||
vptr:src/tools/contract.cpp | ||
vptr:src/tools/extract.cpp | ||
pointer-overflow:include/partitioner/cell_storage.hpp | ||
signed-integer-overflow:include/engine/internal_route_result.hpp | ||
pointer-overflow:third_party/sol2/sol/stack_core.hpp | ||
pointer-overflow:third_party/rapidjson/include/rapidjson/internal/stack.h | ||
nonnull-attribute:third_party/microtar/src/microtar.c | ||
integer-divide-by-zero:unit_tests/library/route.cpp |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,11 @@ std::string LogPolicy::GetLevels() | |
return "NONE, ERROR, WARNING, INFO, DEBUG"; | ||
} | ||
|
||
Log::Log(LogLevel level_, std::ostream &ostream) : level(level_), stream(ostream) | ||
Log::Log(LogLevel level_, std::ostream &ostream) : level(level_), stream(ostream) { Init(); } | ||
|
||
Log::Log(LogLevel level_) : level(level_), buffer{}, stream{buffer} { Init(); } | ||
|
||
void Log::Init() | ||
{ | ||
std::lock_guard<std::mutex> lock(get_mutex()); | ||
if (!LogPolicy::GetInstance().IsMute() && level <= LogPolicy::GetInstance().GetLevel()) | ||
|
@@ -91,8 +95,6 @@ Log::Log(LogLevel level_, std::ostream &ostream) : level(level_), stream(ostream | |
} | ||
} | ||
|
||
Log::Log(LogLevel level_) : Log(level_, buffer) {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems this is considered as UB: we are using field of class itself( |
||
|
||
std::mutex &Log::get_mutex() | ||
{ | ||
static std::mutex mtx; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helpful if we want to see logs of nodejs tests failed on CI.