[CRIU] CRIU gcc9 errors

Dmitry Safonov 0x7f454c46 at gmail.com
Tue Jan 8 20:43:12 MSK 2019


On Tue, 8 Jan 2019 at 16:34, Adrian Reber <adrian at lisas.de> wrote:
>
> I just got an email that CRIU will fail building with the upcoming
> release of gcc. Fortunately the email also included a patch. I attached
> the patch and can submit it properly. Just wanted to hear if anyone has
> any feedback/comments to this patch.
>
> I got the following description for the patch
>
>
>
> Attached you'll find the fix for criu.  You'll see it's just a matter of
> dropping the sp/esp clobber from the relevant asm statements.  THe details:
>
> criu has a macro which defines an asm which appears to want to set a new
> stack pointer, then directly issue a sigreturn call to the kernel.  Some
> variants clobber sp (aarch64, arm, x86), others do not (ppc, s390)
>
>
> While the asm does indeed set a new stack pointer, we never return from
> a sigreturn syscall -- at least not in the normal way.  We actually
> return back to the point where the process was interrupted by the
> signal.  So describing the affect of the asm on the stack pointer is
> pedantically correct, it actually has no real effect and can just be
> dropped to avoid the hard error from gcc-9.

Sounds sane for me.

You can add for full submission:
Reviewed-by: Dmitry Safonov <0x7f454c46 at gmail.com>

Thanks,
             Dmitry


More information about the CRIU mailing list