Fixed a compile bug and added the address santiser

This commit is contained in:
WolverinDEV 2020-12-14 20:33:36 +01:00
parent 835471c2dd
commit 9b8d1d4d65
4 changed files with 7 additions and 7 deletions

View File

@ -8,7 +8,7 @@ set(TEASPEAK_SERVER ON)
#end now
#set(MEMORY_DEBUG_FLAGS " -fsanitize=leak -fsanitize=address -fstack-protector-all ")
#set(MEMORY_DEBUG_FLAGS "-fsanitize=address")
set(MEMORY_DEBUG_FLAGS "-fsanitize=address -fstack-protector-all")
if (NOT BUILD_OS_ARCH)
set(BUILD_OS_ARCH $ENV{build_os_arch})

@ -1 +1 @@
Subproject commit 9cd6648d5f7fb9911c59f03464f8f724df535816
Subproject commit 3a9c5359719d893a35646191389c17338460535a

View File

@ -232,9 +232,9 @@ inline sql::result load_permissions_v2(
return 0;
});
auto end = system_clock::now();
auto time = end - start;
logTrace(server_id, "[SQL] load_permissions(\"{}\") took {}ms", command.sqlCommand(), duration_cast<milliseconds>(time).count());
//auto end = system_clock::now();
//auto time = end - start;
//logTrace(server_id, "[SQL] load_permissions(\"{}\") took {}ms", command.sqlCommand(), duration_cast<milliseconds>(time).count());
}
constexpr static std::string_view kPermissionUpdateCommand{"UPDATE `permissions` SET `value` = :value, `grant` = :grant, `flag_skip` = :flag_skip, `flag_negate` = :flag_negate WHERE `serverId` = :serverId AND `type` = :type AND `id` = :id AND `permId` = :permId AND `channelId` = :chId"};

View File

@ -82,8 +82,8 @@ void terminal::initialize_pipe(const std::string& pipe_path) {
}
void terminal::finalize_pipe() {
if(event_base) {
event_base_loopexit(event_base, nullptr);
if(auto ev_base{std::exchange(event_base, nullptr)}; ev_base) {
event_base_loopexit(ev_base, nullptr);
if(event_loop_dispatcher.joinable() && std::this_thread::get_id() != event_loop_dispatcher.get_id())
event_loop_dispatcher.join();