Commit 771a7b87 authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

test/unit/event: explicitly align reactor on stack



This seems to be a bug in Fedora 38 gcc - if struct
is declared with alignment, then it should get
allocated with alignment on stack.

But work around it for now by explicitly declaring
the variable as aligned.

Fixes issue #3004.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I52d6051815ea55c67f5c0a27648a108c232013e5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18214


Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 606c4a83
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -16,7 +16,10 @@
static void
test_create_reactor(void)
{
	struct spdk_reactor reactor = {};
	/* See SPDK issue #3004.  Seems like a bug with gcc + asan on Fedora 38, so
	 * we need to explicitly align the variable here.
	 */
	struct spdk_reactor reactor __attribute__((aligned(SPDK_CACHE_LINE_SIZE))) = {};

	g_reactors = &reactor;
	g_reactor_count = 1;