maliput / maliput/maliput_malidrive
Address sanitizer: odr-violation
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
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](https://stackoverflow.com/questions/57390595/asan-detects-odr-violation-of-vtable-of-class-which-is-shared-with-dynamically-l) 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with maliput_malidrive/base/malidrive_lane.cc and reproduce the ASAN failure in the four named tests: proxy_loader, road_geometry, road_geometry_builder, and road_network_builder. Compare the duplicate vtable registrations from the test executable and libmalidrive_builder.so, then verify the fix by running those tests without relying on ASAN_OPTIONS=detect_odr_violation=0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100