Skip to content

Commit 49839da

Browse files
committed
ab_tree: reduce visibility of "vs_empty" symbol
Fix one ASAN report about ODR violation ==112305==ERROR: AddressSanitizer: odr-violation (0x7fc5097a6160): [1] size=24 'vs_empty' lib/ab_tree.cpp:157:32 in /root/gromox/.libs/libgxh_ews.so.0 [2] size=24 'vs_empty' lib/ab_tree.cpp:157:32 in /root/gromox/.libs/libgxp_exchange_nsp.so.0
1 parent 757296a commit 49839da

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

include/gromox/ab_tree.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,6 @@ class ab_base {
256256
private:
257257
const ab_domain *find_domain(uint32_t) const;
258258

259-
static const std::vector<std::string> vs_empty; ///< used to return empty alias list in case of invalid minid
260-
261259
GUID m_guid; ///< GUID of the base
262260
gromox::time_point m_load_time{}; ///< Load time
263261
/**

lib/ab_tree.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ void ab::work()
154154
///////////////////////////////////////////////////////////////////////////////////////////////////
155155
// ab_base organizational member functions
156156

157-
const std::vector<std::string> ab_base::vs_empty{};
157+
/* Used to return empty alias list in case of invalid minid */
158+
static const std::vector<std::string> vs_empty;
158159

159160
/**
160161
* @brief Initialize base and lock until loaded

0 commit comments

Comments
 (0)