-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Service Arch 2023-08-07
-
162
SERVER-78390 has a UBSAN true positive. It's not a runtime problem.
We're downcasting a "this" pointer to its CRTP descendent in its CRTP base constructor, and the object is not yet an instance of that CRTP descendent, so this is incorrect. The backlink pointer is all reinterpret casts and lowlevel memory hacking anyway, so we can just pass a void* for this purpose and UBSAN has nothing to complain about. The downcast isn't needed until decoration.owner is called, which should be after the owner is constructed, and the downcast will be valid.
- depends on
-
SERVER-78390 Decorable subsystem refactoring
-
- Closed
-