From 4b3bb829c25e86fb87a4bdce2cfb5d70314b2971 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 29 Mar 2019 12:17:43 +0000 Subject: [PATCH 1/2] epee: init a new ssl related variable in ctor --- contrib/epee/include/net/abstract_tcp_server2.inl | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/epee/include/net/abstract_tcp_server2.inl b/contrib/epee/include/net/abstract_tcp_server2.inl index 58f899a73..14fbec5d9 100644 --- a/contrib/epee/include/net/abstract_tcp_server2.inl +++ b/contrib/epee/include/net/abstract_tcp_server2.inl @@ -95,6 +95,7 @@ PRAGMA_WARNING_DISABLE_VS(4355) : connection_basic(std::move(sock), state, ssl_support), m_protocol_handler(this, check_and_get(state).config, context), + buffer_ssl_init_fill(0), m_connection_type( connection_type ), m_throttle_speed_in("speed_in", "throttle_speed_in"), m_throttle_speed_out("speed_out", "throttle_speed_out"), From 0eee6cd7fec2e9f98de2b9ba39ef3421cbeaa53b Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 29 Mar 2019 12:18:09 +0000 Subject: [PATCH 2/2] block_weight: catch exceptions in main for clean exit on error --- tests/block_weight/block_weight.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/block_weight/block_weight.cpp b/tests/block_weight/block_weight.cpp index 7b3fdfe57..f193133da 100644 --- a/tests/block_weight/block_weight.cpp +++ b/tests/block_weight/block_weight.cpp @@ -195,8 +195,10 @@ static void test(test_t t, uint64_t blocks) int main() { + TRY_ENTRY(); test(test_max, 2 * LONG_TERM_BLOCK_WEIGHT_WINDOW); test(test_lcg, 9 * LONG_TERM_BLOCK_WEIGHT_WINDOW); test(test_min, 1 * LONG_TERM_BLOCK_WEIGHT_WINDOW); return 0; + CATCH_ENTRY_L0("main", 1); }