From: Magnus Jacobsson Date: Tue, 25 May 2021 19:43:32 +0000 (+0200) Subject: Fix ASan odr_violation in mm2gv by not linking to libcommon X-Git-Tag: 2.47.3~21^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=daebd915aab9cc280ca3dde9f9949935fa5883cc;p=graphviz Fix ASan odr_violation in mm2gv by not linking to libcommon libcommon is a static lib, but is already part of the dynamic libgvc. The error message was: ==73343==ERROR: AddressSanitizer: odr-violation (0x555555789760): [1] size=8 'fdp_parms' /home/magjac/graphviz/lib/common/globals.c:30:20 [2] size=8 'fdp_parms' /home/magjac/graphviz/lib/common/globals.c:30:20 These globals were registered at these points: [1]: #0 0x7ffff760d938 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341 #1 0x555555693361 in _sub_I_00099_1 (/home/magjac/build-graphviz-Desktop-Debug/cmd/tools/mm2gv+0x13f361) #2 0x55555569376c in __libc_csu_init (/home/magjac/build-graphviz-Desktop-Debug/cmd/tools/mm2gv+0x13f76c) [2]: #0 0x7ffff760d938 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341 #1 0x7ffff6f7de38 in _sub_I_00099_1 (/home/magjac/build-graphviz-Desktop-Debug/lib/gvc/libgvc.so.6+0x420e38) #2 0x7ffff7fda96d (/lib64/ld-linux-x86-64.so.2+0x1196d) ==73343==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0 SUMMARY: AddressSanitizer: odr-violation: global 'fdp_parms' at /home/magjac/graphviz/lib/common/globals.c:30:20 ==73343==ABORTING --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 97998fd56..7051e6526 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - marginally more accurate computations in Smyrna sphere projection - Perl is no longer required to build Graphviz #2067 +### Fixed + +- no longer pass libcommon to the linker twice in mm2gv when building with CMake + ## [2.47.2] - 2021-05-26 ### Added diff --git a/cmd/tools/CMakeLists.txt b/cmd/tools/CMakeLists.txt index 087bf15cf..c4d07c4b8 100644 --- a/cmd/tools/CMakeLists.txt +++ b/cmd/tools/CMakeLists.txt @@ -355,7 +355,6 @@ target_include_directories(mm2gv PRIVATE target_link_libraries(mm2gv sparse cgraph - common gvc pathplan )