|
From: Nicholas N. <nj...@ca...> - 2004-10-28 16:54:09
|
CVS commit by nethercote:
Fix off-by-one error with VKI_GDT_TLS_MAX.
M +1 -1 coregrind/vg_ldt.c 1.16.2.1
M +1 -1 include/vg_kerneliface.h 1.23.2.1
--- valgrind/coregrind/vg_ldt.c #1.16:1.16.2.1
@@ -197,5 +197,5 @@ Addr VG_(do_useseg) ( UInt seg_selector,
VgLdtEntry* the_tls;
- vg_assert(seg_selector >= VKI_GDT_TLS_MIN && seg_selector < VKI_GDT_TLS_MAX);
+ vg_assert(seg_selector >= VKI_GDT_TLS_MIN && seg_selector <= VKI_GDT_TLS_MAX);
/* Come up with a suitable GDT entry. We look at the thread's TLS
--- valgrind/include/vg_kerneliface.h #1.23:1.23.2.1
@@ -666,5 +666,5 @@ typedef struct vki_modify_ldt_ldt_s {
#define VKI_GDT_TLS_ENTRIES 3
#define VKI_GDT_TLS_MIN 6
-#define VKI_GDT_TLS_MAX (VKI_GDT_TLS_MIN + VKI_GDT_TLS_ENTRIES)
+#define VKI_GDT_TLS_MAX (VKI_GDT_TLS_MIN + VKI_GDT_TLS_ENTRIES - 1)
/* Flags for clone() */
|