]> granicus.if.org Git - strace/blobdiff - sched.c
netlink_sock_diag: print inet_diag_sockid.idiag_if as an interface index
[strace] / sched.c
diff --git a/sched.c b/sched.c
index 409fb67ac544f3c73e8b688ef08d0c513890ad46..7222632944244780ac84ac3364996738ddc82598 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -2,6 +2,7 @@
  * Copyright (c) 2004 Ulrich Drepper <drepper@redhat.com>
  * Copyright (c) 2005 Roland McGrath <roland@redhat.com>
  * Copyright (c) 2012-2015 Dmitry V. Levin <ldv@altlinux.org>
+ * Copyright (c) 2014-2017 The strace developers.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -176,7 +177,19 @@ SYS_FUNC(sched_getattr)
                        print_sched_attr(tcp, tcp->u_arg[1], size);
                else
                        printaddr(tcp->u_arg[1]);
-               tprintf(", %u, %u", size, (unsigned int) tcp->u_arg[3]);
+               tprints(", ");
+#ifdef AARCH64
+               /*
+                * Due to a subtle gcc bug that leads to miscompiled aarch64
+                * kernels, the 3rd argument of sched_getattr is not quite 32-bit
+                * as on other architectures.  For more details see
+                * https://sourceforge.net/p/strace/mailman/message/35721703/
+                */
+               if (syserror(tcp))
+                       print_abnormal_hi(tcp->u_arg[2]);
+#endif
+               tprintf("%u", size);
+               tprintf(", %u", (unsigned int) tcp->u_arg[3]);
        }
 
        return 0;