-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Workload Scheduling
-
Fully Compatible
-
ALL
-
Workload Scheduling 2024-08-05, Workload Scheduling 2024-08-19
The first entry in the decoration buffer's _data pointer is type-erase void* backlink to the decorated object. Therefore, the minimum alignment for the _data allocation should be alingof(void*), not 1, as it is today.
If a decorable in the codebase has all decorations with alignment requirement less than alignof(void*) (generally 8 bytes), then it is possible that we would pass an alignment of 1 to operator new when constructing the _data buffer underlying the DecorationBuffer, which means future accesses to objects in the buffer could be misaligned, generating undefined behavior. This could lead to crashes, or in the worst case writing to invalid memory locations.