oxen-core/src/lmdb
Jason Rhinelander d66e6e9e3f Align hashable data structures
We don't impose any alignment on hashable types, but this means the
hashing function is doing invalid misaligned access when converting to a
size_t.  This aligns all of the primitive data types (crypto::hash,
public keys, etc.) to the same alignment as size_t.

That cascades into a few places in epee which only allow byte spanning
types that have byte alignment when what it really requires is just that
the type has no padding.  In C++17 this is exactly the purpose of
std::has_unique_object_representations, but that isn't available (or
even implementable) in C++14 so add specializations for the type that
need it to tell epee that we know those types are properly packed and
that it can safely use them as bytes.

Related to this, monero/epee also misuses `is_standard_layout` when the
purpose is actually `is_trivially_copyable`, so fixed that too.  (You
need the latter but don't need the former for a type to be safely
memcpy'able; the only purpose of `is_standard_layout` is when you need
to be sure your structs are compatible with C structs which is
irrelevant here).
2019-11-27 14:07:52 -04:00
..
CMakeLists.txt Merge commit '6f07b8ffa555fb3b64c4d5007acd46f496c28d19' into LokiMergeUpstream 2019-04-12 15:33:38 +10:00
database.cpp lmdb: fix size_t size issues on 32 bit 2019-03-31 11:12:21 +00:00
database.h Adding classes, functions, and utilities for common LMDB operations. 2019-03-19 17:52:26 +00:00
error.cpp error: fix compile error on windows with depends 2019-05-02 10:14:09 +00:00
error.h Adding classes, functions, and utilities for common LMDB operations. 2019-03-19 17:52:26 +00:00
key_stream.h Adding classes, functions, and utilities for common LMDB operations. 2019-03-19 17:52:26 +00:00
table.cpp Adding classes, functions, and utilities for common LMDB operations. 2019-03-19 17:52:26 +00:00
table.h Fix warnings emitted on Mac CI machine (#687) 2019-07-01 13:36:18 +10:00
transaction.h Adding classes, functions, and utilities for common LMDB operations. 2019-03-19 17:52:26 +00:00
util.h Align hashable data structures 2019-11-27 14:07:52 -04:00
value_stream.cpp lmdb: fix size_t size issues on 32 bit 2019-03-31 11:12:21 +00:00
value_stream.h lmdb: fix size_t size issues on 32 bit 2019-03-31 11:12:21 +00:00