]> granicus.if.org Git - graphviz/commitdiff
Fix ASan odr_violation in mm2gv by not linking to libcommon
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 25 May 2021 19:43:32 +0000 (21:43 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 30 May 2021 15:27:23 +0000 (17:27 +0200)
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

CHANGELOG.md
cmd/tools/CMakeLists.txt

index 97998fd5663f16cfe1440dab214803df99ce9e0a..7051e6526561297c74640c7fd1d3d65d6ec28e73 100644 (file)
@@ -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
index 087bf15cf0d5d4bfbb2a4549cdddbea678976472..c4d07c4b8ae1898ce4d82eb604e76c8897ff8290 100644 (file)
@@ -355,7 +355,6 @@ target_include_directories(mm2gv PRIVATE
 target_link_libraries(mm2gv
     sparse
     cgraph
-    common
     gvc
     pathplan
 )