> This patch brought back PR libgomp/78468, which had caused its
> predecessor to be backed out of gcc-7.

Yes, it's exactly the same mistake:

+  /* Since the stack is presumed to be aligned before this allocation,
+     we only need to increase the size of the allocation if the required
+     alignment is more than the stack alignment.  */

The stack is aligned before the allocation but it gets misaligned during the 
allocation because the dynamic offset is not a multiple of STACK_BOUNDARY.

The code had been realigning the stack pointer for more than 2 decades to 
enforce STACK_BOUNDARY but suddenly stopped again with Wilco's patch.

The failure mode is very nasty (random corruption of the stack contents) and 
there are very likely other affected targets among the ~50 supported ones.

-- 
Eric Botcazou

Reply via email to