You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't have access to XCode, can you please give me the following information:
shared_ptr_stateful_node_size<TestType>::value
How many bytes are allocated by memory::allocate_shared<TestType>(pool) (you can find it out by setting a breakpoint in std_allocator::allocate, the value is n * sizeof(T) of whatever allocator instantiation was being used.
If there is a mismatch between 1 and 2, the output of nodesize_dbg --verbose
It seems the discrepancy in (1) is that detail::shared_ptr_stateful_node_size<alignof(T)>::value + sizeof(T) here we take the alignof(int)
BUT in (2) the allocator impl is taking the alignof(shared_ptr_stateful_node_size<int>)
The rt::StaticMemoryPool is my implementation of an allocator-- the 1st argument is the capacity, the 2nd template argument is used to determine the size of the nodes
Crash when deallocating shared_ptr building for
arm64
-- Xcode Apple clang version 14.0.3 (clang-1403.0.22.14.1)Has been happening for a couple major Xcode versions so far.
Example program
In fact, resetting the shared_ptr of the 2nd created item can cause a crash.
In my experimenting, the only thing that alleviated the crash was to use
TestType
with asizeof
8 or higher.The text was updated successfully, but these errors were encountered: