From: Ludovic Henry Date: Tue, 16 May 2017 02:19:34 +0000 (-0400) Subject: [threadpool] Fix alignment of ThreadPoolWorkerCounter (#4871) X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=c74f8a0ea534b02fe693862a5c7201100266af0b [threadpool] Fix alignment of ThreadPoolWorkerCounter (#4871) It is accessed with a 64bits atomic operation, so it needs to be 64bits aligned, even on a 32bits platform. A CPU exception EXC_ARM_DA_ALIGN triggers on armv7 32bits. Fix https://bugzilla.xamarin.com/show_bug.cgi?id=56202 --- diff --git a/mono/metadata/threadpool-worker-default.c b/mono/metadata/threadpool-worker-default.c index cfcecf95a85..6c851db7370 100644 --- a/mono/metadata/threadpool-worker-default.c +++ b/mono/metadata/threadpool-worker-default.c @@ -118,7 +118,11 @@ typedef union { gint16 parked; /* parked */ } _; gint64 as_gint64; -} ThreadPoolWorkerCounter; +} ThreadPoolWorkerCounter +#ifdef __GNUC__ +__attribute__((aligned(64))) +#endif +; typedef struct { MonoRefCount ref;