Skip to content

Commit d72d1aa

Browse files
aescolarkartben
authored andcommitted
net: if: Fix net_if_list iteration issue with llvm & ASAN
The address sanitizer in llvm adds padding (redzones) after data. But for those structures we are re-grouping using the linker script and for which we iterate over we cannot have that extra padding. Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent 0359f37 commit d72d1aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/zephyr/net/net_if.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3269,7 +3269,7 @@ extern int net_stats_prometheus_scrape(struct prometheus_collector *collector,
32693269
}; \
32703270
static Z_DECL_ALIGN(struct net_if) \
32713271
NET_IF_GET_NAME(dev_id, sfx)[_num_configs] \
3272-
__used __in_section(_net_if, static, \
3272+
__used __noasan __in_section(_net_if, static, \
32733273
dev_id) = { \
32743274
[0 ... (_num_configs - 1)] = { \
32753275
.if_dev = &(NET_IF_DEV_GET_NAME(dev_id, sfx)), \

0 commit comments

Comments
 (0)