dash/src/support
fanquake 02741a7706
Merge bitcoin/bitcoin#28913: coins: make sure PoolAllocator uses the correct alignment
d5b4c0b69e543de51bb37d602d488ee0949ba185 pool: change memusage_test to use int64_t, add allocation check (Martin Leitner-Ankerl)
ce881bf9fcb7c30bb1fafd6ce38844f4f829452a pool: make sure PoolAllocator uses the correct alignment (Martin Leitner-Ankerl)

Pull request description:

  The class `CTxOut` has a member `CAmount` which is an int64_t, and on ARM 32bit int64_t are 8 byte aligned, which is larger than the pointer alignment of 4 bytes.

  So for `CCoinsMap` to be able to use the pool, we need to use the alignment of the member instead of just `alignof(void*)`.

  This fixes #28906 (first noted in https://github.com/bitcoin/bitcoin/issues/28718#issuecomment-1807197107) and #28440.

ACKs for top commit:
  pinheadmz:
    ACK d5b4c0b69e543de51bb37d602d488ee0949ba185
  hebasto:
    re-ACK d5b4c0b69e543de51bb37d602d488ee0949ba185, the only change since my recent [review](https://github.com/bitcoin/bitcoin/pull/28913#pullrequestreview-1739334189) is an updated test.
  theStack:
    Tested ACK d5b4c0b69e543de51bb37d602d488ee0949ba185

Tree-SHA512: 4446793fad6d56f0fe22e09ac9ade051e86de11ac039cd61c0f6b7f79874242878a6a46a2c76ac3b8f1d53464872620d39139f54b1471daccad26d6bb1ae8ca1
2024-10-23 22:19:56 -05:00
..
allocators Merge bitcoin/bitcoin#28913: coins: make sure PoolAllocator uses the correct alignment 2024-10-23 22:19:56 -05:00
cleanse.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
cleanse.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
events.h
lockedpool.cpp Merge #19111: Limit scope of all global std::once_flag 2024-02-23 13:46:44 -06:00
lockedpool.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00