diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-11 16:49:29 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-12 07:31:17 +0200 |
commit | 97569d3c37a66bc941b933ac7c2cefa5430a5175 (patch) | |
tree | c367e916a133541fa652d3e304101568c1c7c0ff /sql/log.h | |
parent | b4a5ad8db5ef1bcee25d0e10beb708fb00aae94e (diff) | |
download | mariadb-git-97569d3c37a66bc941b933ac7c2cefa5430a5175.tar.gz |
MDEV-24196 WITH_UBSAN: member call on null pointer of log_phys_t
MDEV-12353 deliberately tries to avoid memory alignment overhead in
log_phys_t, storing the stream of log records bytes straight after
a header object. But, offsetof() is not allowed on C++ data objects,
and neither are attempts to emulate it by invoking a member function
on a null pointer.
log_phys_t::len: Remove. Make it part of the byte stream that
immediately follow the object. Thanks to Eugene Kosov for this idea.
log_phys_t::start(): The start address of the following byte stream.
log_phys_t::len(): Compute len.
log_phys_t::alloc_size(): Use a simple sizeof calculation.
Diffstat (limited to 'sql/log.h')
0 files changed, 0 insertions, 0 deletions