diff options
author | fanquake <fanquake@gmail.com> | 2023-11-22 11:12:00 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-11-22 11:15:27 +0000 |
commit | e9beaa749c998ad86e97c98025125cafeec6c9de (patch) | |
tree | f998da96de192f1a294f6f85f1cd711939fabde6 /src/validation.cpp | |
parent | 640b45053020cbbd0af4f4b53ed1b742b6232fb2 (diff) | |
parent | d5b4c0b69e543de51bb37d602d488ee0949ba185 (diff) |
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
Diffstat (limited to 'src/validation.cpp')
0 files changed, 0 insertions, 0 deletions