>From IRC: 20:37 < waldi> the log is full of "warning: cast increases required alignment of target type [-Wcast-align]". i wonder if this would even work 20:38 < jrtc27> based on the reduced test case it looks to me like it doesn't like you using `1 << 31` as an int 20:38 < jrtc27> shifting into the sign bit is undefined behaviour 20:39 < jrtc27> I don't know why only armhf would care compared with other 32-bit architectures that have atomics 20:39 < ansgar> An internal compiler error is still a compiler bug. 20:39 < jrtc27> well 20:39 < jrtc27> it's valid per the C specification 20:39 < jrtc27> but it's poor form that most would regard as a bug in the compiler too 20:40 * jrtc27 goes to amdahl to try playing with the reduced case 20:43 < jrtc27> hm, no, it's still unhappy 20:45 < jrtc27> ottok: if you want a really ugly workaround to thwart the optimisers attempts to shoot itself 20:45 < jrtc27> change IF_DBUG_ASSERT(auto l=,) lock.fetch_sub(WRITER, std::memory_order_release); 20:45 < jrtc27> to volatile uint32_t writer = WRITER; IF_DBUG_ASSERT(auto l=,) lock.fetch_sub(writer, std::memory_order_release); 20:46 < jrtc27> (and best to #ifdef it so you don't add overhead to architectures that don't suffer from such compiler bugs)
For mariadb-10.5 1:10.5.8-1 I applied the patch https://salsa.debian.org/mariadb-team/mariadb-10.5/-/commit/dcafdab0121977be04bc8038a70c800003399841 and the armhf build now passes with this temporary workaround.