File cancelable-syscall-stack-align.patch of Package glibc.33854
Index: glibc-2.22/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
===================================================================
--- glibc-2.22.orig/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
+++ glibc-2.22/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
@@ -39,7 +39,11 @@
ret; \
.size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
L(pseudo_cancel): \
+ subl $12, %esp; \
+ cfi_adjust_cfa_offset (12); \
CENABLE \
+ addl $12, %esp; \
+ cfi_adjust_cfa_offset (-12); \
SAVE_OLDTYPE_##args \
PUSHCARGS_##args \
DOCARGS_##args \
@@ -122,9 +126,17 @@
# endif
# define POPSTATE_0 \
pushl %eax; cfi_adjust_cfa_offset (4); movl %ecx, %eax; \
- CDISABLE; popl %eax; cfi_adjust_cfa_offset (-4);
+ subl $8, %esp; cfi_adjust_cfa_offset (8); \
+ CDISABLE; addl $8, %esp; cfi_adjust_cfa_offset (-8); \
+ popl %eax; cfi_adjust_cfa_offset (-4);
# define POPSTATE_1 POPSTATE_0
-# define POPSTATE_2 xchgl (%esp), %eax; CDISABLE; popl %eax; \
+# define POPSTATE_2 xchgl (%esp), %eax; \
+ subl $8, %esp; \
+ cfi_adjust_cfa_offset (8); \
+ CDISABLE; \
+ addl $8, %esp; \
+ cfi_adjust_cfa_offset (-8); \
+ popl %eax; \
cfi_adjust_cfa_offset (-4);
# define POPSTATE_3 POPSTATE_2
# define POPSTATE_4 POPSTATE_3