Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
staticd: fix duplicate global variable
The mgmt_be_client pointer is defined twice in the code. This leads to address sanitizer issue: > ==2807373==ERROR: AddressSanitizer: odr-violation (0x563c96f1c1a0): > [1] size=8 'mgmt_be_client' staticd/static_main.c:56:24 > [2] size=8 'mgmt_be_client' lib/mgmt_be_client.c:119:24 > These globals were registered at these points: > [1]: > #0 0x7f5b0088a928 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341 > FRRouting#1 0x563c96ec2a55 in _sub_I_00099_1 (/root/frr3/staticd/.libs/staticd+0x16a55) > FRRouting#2 0x7f5afff3aeba in call_init ../csu/libc-start.c:145 > FRRouting#3 0x7f5afff3aeba in __libc_start_main_impl ../csu/libc-start.c:379 > > [2]: > #0 0x7f5b0088a928 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341 > FRRouting#1 0x7f5b004ab2a4 in _sub_I_00099_1 (/root/frr3/lib/.libs/libfrr.so.0+0x2552a4) > FRRouting#2 0x7f5b0124c47d in call_init elf/dl-init.c:70 Fix this by renaming the static variable to static_mgmt_be_client. Fixes: 7aecb86 ("lib: mgmtd: remove abstraction layer and other cleanup") Signed-off-by: Philippe Guibert <[email protected]>
- Loading branch information