Merge branches/OTRACK_BY_INSTRUMENTATION into the trunk.  This adds
support to Memcheck for tracking the origin of uninitialised values,
if you use the --track-origins=yes flag.

This currently causes some Memcheck regression tests to fail, because
they now print an extra line of advisory text in their output.  This
will be fixed.

The core-tool interface is slightly changed.  The version number for
the interface needs to be incremented.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7982 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/pub_core_threadstate.h b/coregrind/pub_core_threadstate.h
index 4c6cbfe..9ffcc7c 100644
--- a/coregrind/pub_core_threadstate.h
+++ b/coregrind/pub_core_threadstate.h
@@ -93,14 +93,21 @@
    struct {
       /* --- BEGIN vex-mandated guest state --- */
 
-      /* Saved machine context. */
-      VexGuestArchState vex;
+      /* Note that for code generation reasons, we require that the
+         guest state area, its two shadows, and the spill area, are
+         16-aligned and have 16-aligned sizes, and there are no holes
+         in between.  This is checked by do_pre_run_checks() in
+         scheduler.c. */
 
-      /* Saved shadow context. */
-      VexGuestArchState vex_shadow;
+      /* Saved machine context. */
+      VexGuestArchState vex __attribute__((aligned(16)));
+
+      /* Saved shadow context (2 copies). */
+      VexGuestArchState vex_shadow1 __attribute__((aligned(16)));
+      VexGuestArchState vex_shadow2 __attribute__((aligned(16)));
 
       /* Spill area. */
-      UChar vex_spill[LibVEX_N_SPILL_BYTES];
+      UChar vex_spill[LibVEX_N_SPILL_BYTES] __attribute__((aligned(16)));
 
       /* --- END vex-mandated guest state --- */
    }