Commit 975852a0 authored by Michal Mielewczyk's avatar Michal Mielewczyk Committed by Tomasz Zawadzki
Browse files

lib/ocf_env: Force struct list 64 bytes alignment



After compiling SPDK with `--enable-ubsan` option, ocf tests fail with the
following error:

src/ocf/mngt/ocf_mngt_common.c:170:2: runtime error: member access within
misaligned address 0x200003800188 for type 'struct ocf_cache', which requires
64 byte alignment

The mentioned line of code is `list_for_each_entry()` macro used for iterating
lists. Forcing `struct list` alignment removes the issue.

Signed-off-by: default avatarMichal Mielewczyk <michal.mielewczyk@intel.com>
Change-Id: I803dd962ff873679f42568e6f42fec7fed278f67
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8516


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarRafal Stefanowski <rafal.stefanowski@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent d60fa400
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@
struct list_head {
	struct list_head *next;
	struct list_head *prev;
};
} __attribute__((aligned(64)));

/**
 * start an empty list