maliput / maliput_malidrive

Open-source ready OpenDrive backend for Maliput
BSD 3-Clause "New" or "Revised" License
1 stars 2 forks source link

Address sanitizer: odr-violation #5

Open francocipollone opened 4 years ago

francocipollone commented 4 years ago

After migrating files from malidrive/builder to maliput_malidrive/builder a error has appeared when running asan:

710/build/malidrive/test_results/malidrive/UNIT_malidrive_road_geometry_builder_test.gtest.xml
124: =================================================================
124: ==16533==ERROR: AddressSanitizer: odr-violation (0x00000094ef60):
124:   [1] size=168 'vtable for malidrive::MalidriveLane' /home/ubuntu/workspace/searchInstitute_malidrive_PR-710/src/malidrive/maliput_malidrive/src/maliput_malidrive/base/malidrive_lane.cc
124:   [2] size=168 'vtable for malidrive::MalidriveLane' /home/ubuntu/workspace/searchInstitute_malidrive_PR-710/src/malidrive/maliput_malidrive/src/maliput_malidrive/base/malidrive_lane.cc
124: These globals were registered at these points:
124:   [1]:
124:     #0 0x454b6e in __asan_register_globals (/home/ubuntu/workspace/searchInstitute_malidrive_PR-710/build/malidrive/test/regression/builder/UNIT_malidrive_road_geometry_builder_test+0x454b6e)
124:     ToyotaResearchInstitute/malidrive#1 0x6bfbeb in asan.module_ctor (/home/ubuntu/workspace/searchInstitute_malidrive_PR-710/build/malidrive/test/regression/builder/UNIT_malidrive_road_geometry_builder_test+0x6bfbeb)
124: 
124:   [2]:
124:     #0 0x454b6e in __asan_register_globals (/home/ubuntu/workspace/searchInstitute_malidrive_PR-710/build/malidrive/test/regression/builder/UNIT_malidrive_road_geometry_builder_test+0x454b6e)
124:     ToyotaResearchInstitute/malidrive#1 0x7fba235facab in asan.module_ctor (/home/ubuntu/workspace/searchInstitute_malidrive_PR-710/install/malidrive/lib/libmalidrive_builder.so+0x240cab)
124: 
124: ==16533==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
124: SUMMARY: AddressSanitizer: odr-violation: global 'vtable for malidrive::MalidriveLane' at /home/ubuntu/workspace/searchInstitute_malidrive_PR-710/src/malidrive/maliput_malidrive/src/maliput_malidrive/base/malidrive_lane.cc
124: ==16533==ABORTING
124: -- run_test.py: return code 1

In the following tests:

The following tests FAILED:
    102 - UNIT_malidrive_proxy_loader_test (Failed)
    106 - UNIT_malidrive_road_geometry_test (Failed)
    124 - UNIT_malidrive_road_geometry_builder_test (Failed)
    126 - UNIT_malidrive_road_network_builder_test (Failed)

Here I found someone that had the same issue, apparently due to a kwnon issue in the clang-asan feature.

For the moment I've just suppressed the throws by setting the env variable ASAN_OPTIONS=detect_odr_violation=0

See https://github.com/ToyotaResearchInstitute/malidrive/pull/710

agalbachicar commented 3 years ago

We should look into this once the migration to foxy is done.