ASSERT pend_unit_size does not have AVX_ALIGNMENT on processor with AVX
Created by: petervbraun
Note this is different than the similarly titled issue because my processor does have AVX.
I am using the most recent source code. The assert is in core/unix/signal.c:532
IF_LINUX(IF_X86(ASSERT(!YMM_ENABLED() || ALIGNED(pend_unit_size, AVX_ALIGNMENT))));
My machine is linux, is x86, and does have YMM_ENABLED.
This fails because on my machine pend_unit_size=3272
which is not a multiple of 64.
I also find
Sizeof(sigpending_t)=1344
Signal_frame_extra_size(true)=2760
-sizeof(kernel_xstate_t)=-832
Where pend_unit_size = Sizeof(sigpending_t) + Signal_frame_extra_size(true) + -sizeof(kernel_xstate_t)
and signal_frame_extra_size(true) = xstate_size + (AVX_ALIGNMENT – 4)
.
The comments on signal_frame_extra_size() from signal_linux_x86.c seem to indicate that the second part, (AVX_ALIGNMENT – 4), is supposed to ensure alignment. If I change that instead to either (AVX_ALIGNMENT – 12) or (AVX_ALIGNMENT + 52) the assert statement succeeds. Is this a correct modification?