Blame SOURCES/strace-strict-aliasing.patch

2f474b
diff -Nrup a/system.c b/system.c
2f474b
--- a/system.c	2012-03-16 05:02:22.000000000 -0600
2f474b
+++ b/system.c	2013-02-18 15:17:23.651569983 -0700
2f474b
@@ -516,10 +516,14 @@ print_cap_header(struct tcb *tcp, unsign
2f474b
 		 umoven(tcp, addr, sizeof(*arg.p), arg.c) < 0)
2f474b
 		tprintf("%#lx", addr);
2f474b
 	else {
2f474b
+		__u32 version;
2f474b
+		int pid;
2f474b
 		tprints("{");
2f474b
-		printxval(cap_version, arg.p->version,
2f474b
+		memcpy (&version, &arg.p->version, sizeof (__u32));
2f474b
+		printxval(cap_version, version,
2f474b
 			  "_LINUX_CAPABILITY_VERSION_???");
2f474b
-		tprintf(", %d}", arg.p->pid);
2f474b
+		memcpy (&pid, &arg.p->pid, sizeof (int));
2f474b
+		tprintf(", %d}", pid);
2f474b
 	}
2f474b
 }
2f474b
 
2f474b
@@ -537,12 +541,16 @@ print_cap_data(struct tcb *tcp, unsigned
2f474b
 		 umoven(tcp, addr, sizeof(*arg.p), arg.c) < 0)
2f474b
 		tprintf("%#lx", addr);
2f474b
 	else {
2f474b
+		__u32 x;
2f474b
 		tprints("{");
2f474b
-		printflags(capabilities, arg.p->effective, "CAP_???");
2f474b
+		memcpy (&x, &arg.p->effective, sizeof (__u32));
2f474b
+		printflags(capabilities, x, "CAP_???");
2f474b
 		tprints(", ");
2f474b
-		printflags(capabilities, arg.p->permitted, "CAP_???");
2f474b
+		memcpy (&x, &arg.p->permitted, sizeof (__u32));
2f474b
+		printflags(capabilities, x, "CAP_???");
2f474b
 		tprints(", ");
2f474b
-		printflags(capabilities, arg.p->inheritable, "CAP_???");
2f474b
+		memcpy (&x, &arg.p->inheritable, sizeof (__u32));
2f474b
+		printflags(capabilities, x, "CAP_???");
2f474b
 		tprints("}");
2f474b
 	}
2f474b
 }