@cryptotaxi247 / netdata-1 / commits / 95aa40356

Fix compilation when using FSANITIZE_ADDRESS (#20129)

Fix compilation when using FSANITIZE_ADDRESS without NETDATA_INTERNAL_CHECKS

Stelios Fragkakis committed Apr 15, 2025 at 14:54 UTC 95aa4035645b858aabc8a2fe083bf280ba76c52d
2 files changed +4 -2
src/libnetdata/dictionary/dictionary-internals.h
+3 -1
@@ -78,8 +78,10 @@ struct dictionary_item {
78 #ifdef FSANITIZE_ADDRESS
79 STACKTRACE_ARRAY stacktraces; // stack traces from all acquisition points
80 #endif
81 +#if defined(FSANITIZE_ADDRESS) || defined(NETDATA_INTERNAL_CHECKS)
82 + DICTIONARY *dict; // the dictionary this item belongs to
83 +#endif
84 #ifdef NETDATA_INTERNAL_CHECKS
82 - DICTIONARY *dict;
85 pid_t creator_pid;
86 pid_t deleter_pid;
87 pid_t ll_adder_pid;
src/libnetdata/dictionary/dictionary-item.h
+1 -1
@@ -83,7 +83,7 @@ static inline DICTIONARY_ITEM *dict_item_create(DICTIONARY *dict __maybe_unused,
83 *allocated_bytes += size;
84 }
85
86 -#ifdef NETDATA_INTERNAL_CHECKS
86 +#if defined(FSANITIZE_ADDRESS) || defined(NETDATA_INTERNAL_CHECKS)
87 item->dict = dict;
88 #endif
89 return item;