0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-30 16:53:45 +02:00

ircd: Attribute static dtors worthy of running to cleanup memcheck reports.

This commit is contained in:
Jason Volk 2022-06-15 09:36:03 -07:00
parent 202521b9ef
commit 9d0d45294c
14 changed files with 44 additions and 4 deletions

View file

@ -95,6 +95,7 @@ ircd::client::pool_opts
/// The pool of request contexts. When a client makes a request it does so by acquiring /// The pool of request contexts. When a client makes a request it does so by acquiring
/// a stack from this pool. The request handling and response logic can then be written /// a stack from this pool. The request handling and response logic can then be written
/// in a synchronous manner as if each connection had its own thread. /// in a synchronous manner as if each connection had its own thread.
[[clang::always_destroy]]
decltype(ircd::client::pool) decltype(ircd::client::pool)
ircd::client::pool ircd::client::pool
{ {

View file

@ -50,6 +50,7 @@ ircd::ctx::ctx::id_ctr
/// execution slice in the ircd::ios handler list. This posits the entire /// execution slice in the ircd::ios handler list. This posits the entire
/// ircd::ctx system as one ircd::ios handler type among all the others. /// ircd::ctx system as one ircd::ios handler type among all the others.
/// At this time it is unclear how to hook a context's execution slice in the ircd::ios system. /// At this time it is unclear how to hook a context's execution slice in the ircd::ios system.
[[clang::always_destroy]]
decltype(ircd::ctx::ctx::ios_desc) decltype(ircd::ctx::ctx::ios_desc)
ircd::ctx::ctx::ios_desc ircd::ctx::ctx::ios_desc
{ {
@ -543,6 +544,7 @@ namespace ircd::ctx
extern ios::descriptor signal_desc; extern ios::descriptor signal_desc;
} }
[[clang::always_destroy]]
decltype(ircd::ctx::signal_desc) decltype(ircd::ctx::signal_desc)
ircd::ctx::signal_desc ircd::ctx::signal_desc
{ {
@ -740,6 +742,7 @@ noexcept
// ctx/this_ctx.h // ctx/this_ctx.h
// //
[[clang::always_destroy]]
decltype(ircd::ctx::this_ctx::courtesy_yield_desc) decltype(ircd::ctx::this_ctx::courtesy_yield_desc)
ircd::ctx::this_ctx::courtesy_yield_desc ircd::ctx::this_ctx::courtesy_yield_desc
{ {
@ -1152,6 +1155,7 @@ namespace ircd::ctx
extern ios::descriptor spawn_desc[3]; extern ios::descriptor spawn_desc[3];
} }
[[clang::always_destroy]]
decltype(ircd::ctx::spawn_desc) decltype(ircd::ctx::spawn_desc)
ircd::ctx::spawn_desc ircd::ctx::spawn_desc
{ {

View file

@ -16,9 +16,9 @@ namespace ircd::ctx::ole
static std::mutex mutex; static std::mutex mutex;
static std::condition_variable cond; static std::condition_variable cond;
static std::deque<offload::function> queue; extern std::deque<offload::function> queue;
static ssize_t working; static ssize_t working;
static std::vector<std::thread> threads; extern std::vector<std::thread> threads;
static bool termination alignas(64); static bool termination alignas(64);
static offload::function pop(); static offload::function pop();
@ -34,6 +34,14 @@ ircd::ctx::ole::thread_max
{ "default", int64_t(1) }, { "default", int64_t(1) },
}; };
[[gnu::visibility("internal"), clang::always_destroy]]
decltype(ircd::ctx::ole::queue)
ircd::ctx::ole::queue;
[[gnu::visibility("internal"), clang::always_destroy]]
decltype(ircd::ctx::ole::threads)
ircd::ctx::ole::threads;
ircd::ctx::ole::init::init() ircd::ctx::ole::init::init()
{ {
assert(threads.empty()); assert(threads.empty());

View file

@ -95,6 +95,7 @@ ircd::db::request_pool_opts
/// The number of workers in this pool should upper bound at the /// The number of workers in this pool should upper bound at the
/// number of concurrent AIO requests which are effective on this /// number of concurrent AIO requests which are effective on this
/// system. This is a static pool shared by all databases. /// system. This is a static pool shared by all databases.
[[clang::always_destroy]]
decltype(ircd::db::request) decltype(ircd::db::request)
ircd::db::request ircd::db::request
{ {
@ -281,6 +282,7 @@ catch(const std::exception &e)
}; };
} }
[[clang::always_destroy]]
decltype(ircd::db::compressions) decltype(ircd::db::compressions)
ircd::db::compressions; ircd::db::compressions;

View file

@ -130,6 +130,7 @@ ircd::fmt::specifier
static const specifier &at(const string_view &name); static const specifier &at(const string_view &name);
}; };
[[clang::always_destroy]]
decltype(ircd::fmt::specifier::registry) decltype(ircd::fmt::specifier::registry)
ircd::fmt::specifier::registry; ircd::fmt::specifier::registry;

View file

@ -674,12 +674,14 @@ ircd::fs::aio::system::eventfd_flags
EFD_CLOEXEC | EFD_NONBLOCK EFD_CLOEXEC | EFD_NONBLOCK
}; };
[[clang::always_destroy]]
decltype(ircd::fs::aio::system::chase_descriptor) decltype(ircd::fs::aio::system::chase_descriptor)
ircd::fs::aio::system::chase_descriptor ircd::fs::aio::system::chase_descriptor
{ {
"ircd.fs.aio.chase" "ircd.fs.aio.chase"
}; };
[[clang::always_destroy]]
decltype(ircd::fs::aio::system::handle_descriptor) decltype(ircd::fs::aio::system::handle_descriptor)
ircd::fs::aio::system::handle_descriptor ircd::fs::aio::system::handle_descriptor
{ {

View file

@ -512,6 +512,7 @@ catch(...)
throw; throw;
} }
[[clang::always_destroy]]
decltype(ircd::fs::iou::system::handle_descriptor) decltype(ircd::fs::iou::system::handle_descriptor)
ircd::fs::iou::system::handle_descriptor ircd::fs::iou::system::handle_descriptor
{ {

View file

@ -63,6 +63,7 @@ ircd::instance_list<ircd::log::log>::list
allocator allocator
}; };
[[clang::always_destroy]]
decltype(ircd::log::file) decltype(ircd::log::file)
ircd::log::file; ircd::log::file;
@ -845,6 +846,7 @@ ircd::log::is_conf_mask_file(const string_view &name)
return empty(string_view(mask_file)); return empty(string_view(mask_file));
} }
[[clang::always_destroy]]
decltype(ircd::log::unmask_file) decltype(ircd::log::unmask_file)
ircd::log::unmask_file ircd::log::unmask_file
{ {
@ -858,6 +860,7 @@ ircd::log::unmask_file
} }
}; };
[[clang::always_destroy]]
decltype(ircd::log::unmask_console) decltype(ircd::log::unmask_console)
ircd::log::unmask_console ircd::log::unmask_console
{ {
@ -871,6 +874,7 @@ ircd::log::unmask_console
} }
}; };
[[clang::always_destroy]]
decltype(ircd::log::mask_file) decltype(ircd::log::mask_file)
ircd::log::mask_file ircd::log::mask_file
{ {
@ -884,6 +888,7 @@ ircd::log::mask_file
} }
}; };
[[clang::always_destroy]]
decltype(ircd::log::mask_console) decltype(ircd::log::mask_console)
ircd::log::mask_console ircd::log::mask_console
{ {

View file

@ -1172,9 +1172,9 @@ ircd::mods::suffix
boost::dll::shared_library::suffix().string() boost::dll::shared_library::suffix().string()
}; };
[[clang::always_destroy]]
decltype(ircd::mods::paths) decltype(ircd::mods::paths)
ircd::mods::paths ircd::mods::paths;
{};
// //
// util // util

View file

@ -1194,6 +1194,7 @@ ircd::net::scope_timeout::release()
// net/socket.h // net/socket.h
// //
[[clang::always_destroy]]
decltype(ircd::net::ssl_curve_list) decltype(ircd::net::ssl_curve_list)
ircd::net::ssl_curve_list ircd::net::ssl_curve_list
{ {
@ -1201,6 +1202,7 @@ ircd::net::ssl_curve_list
{ "default", string_view{} }, { "default", string_view{} },
}; };
[[clang::always_destroy]]
decltype(ircd::net::ssl_cipher_list) decltype(ircd::net::ssl_cipher_list)
ircd::net::ssl_cipher_list ircd::net::ssl_cipher_list
{ {
@ -1208,6 +1210,7 @@ ircd::net::ssl_cipher_list
{ "default", string_view{} }, { "default", string_view{} },
}; };
[[clang::always_destroy]]
decltype(ircd::net::ssl_cipher_blacklist) decltype(ircd::net::ssl_cipher_blacklist)
ircd::net::ssl_cipher_blacklist ircd::net::ssl_cipher_blacklist
{ {
@ -1215,6 +1218,7 @@ ircd::net::ssl_cipher_blacklist
{ "default", string_view{} }, { "default", string_view{} },
}; };
[[clang::always_destroy]]
[[gnu::visibility("hidden")]] [[gnu::visibility("hidden")]]
boost::asio::ssl::context boost::asio::ssl::context
ircd::net::sslv23_client ircd::net::sslv23_client
@ -1228,30 +1232,35 @@ ircd::net::socket::count;
decltype(ircd::net::socket::instances) decltype(ircd::net::socket::instances)
ircd::net::socket::instances; ircd::net::socket::instances;
[[clang::always_destroy]]
decltype(ircd::net::socket::desc_connect) decltype(ircd::net::socket::desc_connect)
ircd::net::socket::desc_connect ircd::net::socket::desc_connect
{ {
"ircd.net.socket.connect" "ircd.net.socket.connect"
}; };
[[clang::always_destroy]]
decltype(ircd::net::socket::desc_handshake) decltype(ircd::net::socket::desc_handshake)
ircd::net::socket::desc_handshake ircd::net::socket::desc_handshake
{ {
"ircd.net.socket.handshake" "ircd.net.socket.handshake"
}; };
[[clang::always_destroy]]
decltype(ircd::net::socket::desc_disconnect) decltype(ircd::net::socket::desc_disconnect)
ircd::net::socket::desc_disconnect ircd::net::socket::desc_disconnect
{ {
"ircd.net.socket.disconnect" "ircd.net.socket.disconnect"
}; };
[[clang::always_destroy]]
decltype(ircd::net::socket::desc_timeout) decltype(ircd::net::socket::desc_timeout)
ircd::net::socket::desc_timeout ircd::net::socket::desc_timeout
{ {
"ircd.net.socket.timeout" "ircd.net.socket.timeout"
}; };
[[clang::always_destroy]]
decltype(ircd::net::socket::desc_wait) decltype(ircd::net::socket::desc_wait)
ircd::net::socket::desc_wait ircd::net::socket::desc_wait
{ {

View file

@ -226,12 +226,14 @@ ircd::net::acceptor::log
"net.listen" "net.listen"
}; };
[[clang::always_destroy]]
decltype(ircd::net::acceptor::accept_desc) decltype(ircd::net::acceptor::accept_desc)
ircd::net::acceptor::accept_desc ircd::net::acceptor::accept_desc
{ {
"ircd.net.acceptor.accept" "ircd.net.acceptor.accept"
}; };
[[clang::always_destroy]]
decltype(ircd::net::acceptor::handshake_desc) decltype(ircd::net::acceptor::handshake_desc)
ircd::net::acceptor::handshake_desc ircd::net::acceptor::handshake_desc
{ {

View file

@ -573,6 +573,7 @@ const
return ss.str(); return ss.str();
} }
[[clang::always_destroy]]
decltype(ircd::rfc1035::rcode) decltype(ircd::rfc1035::rcode)
ircd::rfc1035::rcode ircd::rfc1035::rcode
{ {
@ -603,6 +604,7 @@ ircd::rfc1035::rcode
"BADCOOKIE Bad/missing Server Cookie [RFC7873]", // 24 "BADCOOKIE Bad/missing Server Cookie [RFC7873]", // 24
}; };
[[clang::always_destroy]]
decltype(ircd::rfc1035::qtype) decltype(ircd::rfc1035::qtype)
ircd::rfc1035::qtype ircd::rfc1035::qtype
{ {
@ -692,6 +694,7 @@ ircd::rfc1035::qtype
{ "TA", 32768 }, // DNSSEC Trust Authorities [Sam_Weiler][http://cameo.library.cmu.edu/] { "TA", 32768 }, // DNSSEC Trust Authorities [Sam_Weiler][http://cameo.library.cmu.edu/]
}; };
[[clang::always_destroy]]
decltype(ircd::rfc1035::rqtype) decltype(ircd::rfc1035::rqtype)
ircd::rfc1035::rqtype{[] ircd::rfc1035::rqtype{[]
{ {

View file

@ -711,6 +711,7 @@ decltype(ircd::server::peer::sock_opts)
ircd::server::peer::sock_opts ircd::server::peer::sock_opts
{}; {};
[[clang::always_destroy]]
decltype(ircd::server::peer::close_desc) decltype(ircd::server::peer::close_desc)
ircd::server::peer::close_desc ircd::server::peer::close_desc
{ {

View file

@ -445,6 +445,7 @@ ircd::util::a2u(const mutable_buffer &out,
ircd::util::unwind_defer::~unwind_defer() ircd::util::unwind_defer::~unwind_defer()
noexcept noexcept
{ {
[[clang::always_destroy]]
static ios::descriptor descriptor static ios::descriptor descriptor
{ {
"ircd.unwind" "ircd.unwind"