mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-20 07:13:56 -07:00
Once 'delete' is called on an object, that object no longer exists, and accessing its member variables is undefined behaviour. GCC 4.9's optimiser recognises this, and eliminates any writes to member variables inside the destructor, since it knows they cannot legally be read later. BoundaryTagManager relied on ~FreedBlock resetting its memory to 0, so this optimisation broke it. Replace the placement new/delete with plain non-magic Setup/Reset functions, to avoid the optimisation. Fixes #2481. This was SVN commit r15334. |
||
|---|---|---|
| .. | ||
| tests | ||
| aligned_allocator.h | ||
| allocator_adapters.h | ||
| allocator_checker.h | ||
| allocator_policies.h | ||
| arena.cpp | ||
| arena.h | ||
| dynarray.cpp | ||
| dynarray.h | ||
| freelist.cpp | ||
| freelist.h | ||
| headerless.cpp | ||
| headerless.h | ||
| overrun_protector.h | ||
| page_aligned.cpp | ||
| page_aligned.h | ||
| pool.cpp | ||
| pool.h | ||
| shared_ptr.cpp | ||
| shared_ptr.h | ||
| unique_range.cpp | ||
| unique_range.h | ||