- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 557
 
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Flecs is invoking undefined behaviour by casting function pointers with reinterpret_cast in many functions of flecs::opaque and then calling them with the wrong signature:
flecs/include/flecs/addons/cpp/mixins/meta/opaque.hpp
Lines 46 to 51 in de8b378
| opaque& serialize(flecs::serialize<T> func) { | |
| this->desc.type.serialize = | |
| reinterpret_cast<decltype( | |
| this->desc.type.serialize)>(func); | |
| return *this; | |
| } | 
Caught using
-fsanitize=undefined under clang.The fix seems more complicated than #1416 because we need to somehow pass a function pointer that would call the other function pointer, or find some other trick.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working