Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined sanitizer issue #304

Closed
MBkkt opened this issue Dec 9, 2022 · 4 comments
Closed

Undefined sanitizer issue #304

MBkkt opened this issue Dec 9, 2022 · 4 comments
Labels
Milestone

Comments

@MBkkt
Copy link

MBkkt commented Dec 9, 2022

https://github.com/arangodb/arangodb/blob/devel/tests/Sharding/ShardDistributionReporterTest.cpp#L136

Maybe we are use it wrong?
Cannot understand, both classes have virtual dtor.
Also we use old version of fakeit, I tried new but nothing changed.

clang is 14.0.6

cmake .. -DUSE_ENTERPRISE=On -DUSE_MAINTAINER_MODE=On -DUSE_FAILURE_TESTS=On -DUSE_JEMALLOC=Off -DUSE_IPO=Off -DCMAKE_C_FLAGS="-fsanitize=address,undefined,float-divide-by-zero,leak -fno-sanitize=alignment" -DCMAKE_CXX_FLAGS="-fsanitize=address,undefined,float-divide-by-zero,leak -fno-sanitize=alignment" -DBASE_LD_FLAGS="-fuse-ld=lld -Wl,--build-id -fno-stack-protector" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUSE_FAIL_ON_WARNINGS=On
➜  arangodb git:(devel) ✗ ./build_aulsan/bin/arangodbtests --gtest_filter="*ShardDistributionReporterTest*"
Note: Google Test filter = *ShardDistributionReporterTest*
[==========] Running 8 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 8 tests from ShardDistributionReporterTest
[ RUN      ] ShardDistributionReporterTest.a_healthy_instance_a_single_collection_of_three_shards_and_three_replicas
/home/mbkkt/projects/arangodb/3rdParty/fakeit-gtest/fakeit.hpp:5278:47: runtime error: member call on address 0x7ffe801a0560 which does not point to an object of type 'arangodb::ClusterInfo'
0x7ffe801a0560: note: object is of type 'fakeit::VirtualOffsetSelector'
 fe 7f 00 00  40 ae 0a 28 a5 55 00 00  07 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  80 04 1a 80
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'fakeit::VirtualOffsetSelector'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/mbkkt/projects/arangodb/3rdParty/fakeit-gtest/fakeit.hpp:5278:47 in 
/home/mbkkt/projects/arangodb/3rdParty/fakeit-gtest/fakeit.hpp:5278:47: runtime error: member call on address 0x7ffe801a0560 which does not point to an object of type 'arangodb::CollectionInfoCurrent'
0x7ffe801a0560: note: object is of type 'fakeit::VirtualOffsetSelector'
 fe 7f 00 00  40 ae 0a 28 a5 55 00 00  04 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  80 04 1a 80
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'fakeit::VirtualOffsetSelector'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/mbkkt/projects/arangodb/3rdParty/fakeit-gtest/fakeit.hpp:5278:47 in 
@MBkkt
Copy link
Author

MBkkt commented Dec 9, 2022

#261

@FranckRJ
Copy link
Collaborator

As you seen in the PR you linked there are some issues with sanitizers and fakeit as of now. I'll try fix some of them for the next release.

@FranckRJ FranckRJ added the bug label Dec 16, 2022
@FranckRJ FranckRJ added this to the 2.4.0 milestone Dec 16, 2022
@MBkkt
Copy link
Author

MBkkt commented Dec 16, 2022

Cool thanks, it's same issue as in 261 pr

@FranckRJ
Copy link
Collaborator

It's fixed by #318 which will be in FakeIt 2.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants