Strange address sanitizer complaints by Apple clang
Open
Nobody has claimed this yet.
testing
- Dominant language
- C++
- Stars
- 693
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
This happens when running the plugin demo with asan on mac:
It does not happen with clang15 on Linux and it seems that it shouldn't happen on mac as well.
/Users/runner/work/dynamix/dynamix/code/./dynamix/mutate.hpp:13:10: runtime error: member call on address 0x7ff7b95e7ca0 which does not point to an object of type 'dynamix::common_mixin_init<tap::person>'
Errors while running CTest
0x7ff7b95e7ca0: note: object is of type 'tap::mixin_person'
01 00 00 00 f0 34 ec 06 01 00 00 00 b0 79 ec 06 01 00 00 00 ff ff ff ff f7 7f 00 00 80 ea aa 06
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'tap::mixin_person'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/runner/work/dynamix/dynamix/code/./dynamix/mutate.hpp:13:10 in
/Users/runner/work/dynamix/dynamix/code/dynamix/object_mutation.cpp:236:20: runtime error: call to function int dynamix::util::call_mixin_default_ctor<tap::teacher>(dnmx_mixin_info const*, void*) through pointer to incorrect function type 'int (*)(const dnmx_mixin_info *, void *)'
mixin_info_util.hpp:16: note: int dynamix::util::call_mixin_default_ctor<tap::teacher>(dnmx_mixin_info const*, void*) defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/runner/work/dynamix/dynamix/code/dynamix/object_mutation.cpp:236:20 in
/Users/runner/work/dynamix/dynamix/code/dynamix/object_mutation.cpp:167:9: runtime error: call to function void dynamix::util::call_mixin_dtor<tap::teacher>(dnmx_mixin_info const*, void*) through pointer to incorrect function type 'void (*)(const dnmx_mixin_info *, void *) noexcept'
mixin_info_util.hpp:21: note: void dynamix::util::call_mixin_dtor<tap::teacher>(dnmx_mixin_info const*, void*) defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/runner/work/dynamix/dynamix/code/dynamix/object_mutation.cpp:167:9 in
/Users/runner/work/dynamix/dynamix/code/./dynamix/mutate.hpp:13:10: runtime error: member call on address 0x7ff7b95e75a0 which does not point to an object of type 'dynamix::common_mixin_init<tap::person>'
0x7ff7b95e75a0: note: object is of type 'tap::mixin_person'
b0 [60](https://github.com/iboB/dynamix/actions/runs/4453732770/jobs/7822459107#step:6:61) 00 00 f0 34 ec 06 01 00 00 00 b0 79 ec 06 01 00 00 00 ff ff ff ff f7 7f 00 00 c0 eb aa 06
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'tap::mixin_person'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/runner/work/dynamix/dynamix/code/./dynamix/mutate.hpp:13:10 in
[doctest] doctest version is "2.4.9"
[doctest] run with "--help" for options
More time needs to be invested here.
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
Reproduce the plugin demo with AddressSanitizer on macOS and inspect dynamix/mutate.hpp, dynamix/object_mutation.cpp, and mixin_info_util.hpp at the reported locations. Compare the result with clang 15 on Linux and the existing CTest run; done means the macOS run no longer reports these undefined-behavior errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100