]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Rename some _SIZE macros as _SZB to make their units clear. This change is
authorNicholas Nethercote <njn@valgrind.org>
Sun, 8 May 2005 17:49:37 +0000 (17:49 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Sun, 8 May 2005 17:49:37 +0000 (17:49 +0000)
in response to a mixed-units (bytes and words) error we had involving
VGA_STACK_REDZONE_SIZE (which is now VGA_STACK_REDZONE_SZB).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3639

NOTES.txt
cachegrind/cg_main.c
coregrind/m_aspacemgr/aspacemgr.c
coregrind/m_sigframe/sigframe-amd64-linux.c
coregrind/m_sigframe/sigframe-x86-linux.c
coregrind/m_stacktrace.c
coregrind/vg_signals.c
include/amd64/tool_arch.h
include/arm/tool_arch.h
include/x86/tool_arch.h
memcheck/mac_shared.h

index 6b6d7bc544f8ba0e2a51c22fc7dcb3c86b464b77..29a1c80d2a60a02caf10239cf724dd8d9460c3e4 100644 (file)
--- a/NOTES.txt
+++ b/NOTES.txt
@@ -2,7 +2,7 @@
 23 Apr 05 (memcheck-on-amd64 notes)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * If a thread is given an initial stack with address range [lo .. hi],
-  we need to tell memcheck that the area [lo - VGA_STACK_REDZONE_SIZE
+  we need to tell memcheck that the area [lo - VGA_STACK_REDZONE_SZB
   .. hi] is valid, rather than just [lo .. hi] as has been the case on
   x86-only systems.  However, am not sure where to look for the call
   into memcheck that states the new stack area.
index 3cea6e2587ba4e762c489fb95d715064164fccde..6421b1037cd88c6a3fd0714b14d3487ece543d80 100644 (file)
@@ -535,8 +535,8 @@ void endOfInstr(IRBB* bbOut, instr_info* i_node, Bool bbSeenBefore,
 
    // Nb: instrLen will be zero if Vex failed to decode it.
    tl_assert( 0 == instrLen ||
-              (instrLen >= VGA_MIN_INSTR_SIZE && 
-               instrLen <= VGA_MAX_INSTR_SIZE) );
+              (instrLen >= VGA_MIN_INSTR_SZB && 
+               instrLen <= VGA_MAX_INSTR_SZB) );
 
    // Large (eg. 28B, 108B, 512B on x86) data-sized instructions will be
    // done inaccurately, but they're very rare and this avoids errors from
index 785eec73d7532d882e663ad5884c6fee8abbf08e..e5505c00c5163b802ce05262a57a52cc7a820a05 100644 (file)
@@ -1042,7 +1042,7 @@ Segment *VG_(find_segment_above_mapped)(Addr a)
    the kernel as the stack pointer moves down.  Initially, a 1-page
    (4k) stack is allocated.  When SP moves below that for the first
    time, presumably a page fault occurs.  The kernel detects that the
-   faulting address is in the range from SP - VGA_STACK_REDZONE_SIZE
+   faulting address is in the range from SP - VGA_STACK_REDZONE_SZB
    upwards to the current valid stack.  It then extends the stack
    segment downwards for enough to cover the faulting address, and
    resumes the process (invisibly).  The process is unaware of any of
@@ -1062,12 +1062,12 @@ Segment *VG_(find_segment_above_mapped)(Addr a)
    When SP goes back up, mark the area receded over as unreadable and
    unwritable.
 
-   Just to record the SP boundary conditions somewhere convenient: SP
-   - VGA_STACK_REDZONE_SIZE always points to the lowest live byte in
-   the stack.  All addresses below SP - VGA_STACK_REDZONE_SIZE are not
+   Just to record the SP boundary conditions somewhere convenient: 
+   SP - VGA_STACK_REDZONE_SZB always points to the lowest live byte in
+   the stack.  All addresses below SP - VGA_STACK_REDZONE_SZB are not
    live; those at and above it are.
 
-   We do not concern ourselves here with the VGA_STACK_REDZONE_SIZE
+   We do not concern ourselves here with the VGA_STACK_REDZONE_SZB
    bias; that is handled by new_mem_stack/die_mem_stack.
 */
 
index 622806a2363badd1dcdfa3f4ed31b3b837178c6e..8c765c4993da18ef6d0dc4d64fc1366998b0d5d6 100644 (file)
@@ -399,8 +399,8 @@ static Bool extend ( ThreadState *tst, Addr addr, SizeT size )
 
    /* For tracking memory events, indicate the entire frame has been
       allocated. */
-   VG_TRACK( new_mem_stack_signal, addr - VGA_STACK_REDZONE_SIZE,
-             size + VGA_STACK_REDZONE_SIZE );
+   VG_TRACK( new_mem_stack_signal, addr - VGA_STACK_REDZONE_SZB,
+             size + VGA_STACK_REDZONE_SZB );
 
    return True;
 }
@@ -597,8 +597,8 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT )
 
    size = restore_rt_sigframe(tst, (struct rt_sigframe *)rsp, &sigNo);
 
-   VG_TRACK( die_mem_stack_signal, rsp - VGA_STACK_REDZONE_SIZE,
-             size + VGA_STACK_REDZONE_SIZE );
+   VG_TRACK( die_mem_stack_signal, rsp - VGA_STACK_REDZONE_SZB,
+             size + VGA_STACK_REDZONE_SZB );
 
    if (VG_(clo_trace_signals))
       VG_(message)(
index bcf211167be2d7beeaecc79c0aa3648b0942e014..e19cac72f3e84b5346c9b427db10c6053b91c68b 100644 (file)
@@ -420,8 +420,8 @@ static Bool extend ( ThreadState *tst, Addr addr, SizeT size )
 
    /* For tracking memory events, indicate the entire frame has been
       allocated. */
-   VG_TRACK( new_mem_stack_signal, addr - VGA_STACK_REDZONE_SIZE,
-             size + VGA_STACK_REDZONE_SIZE );
+   VG_TRACK( new_mem_stack_signal, addr - VGA_STACK_REDZONE_SZB,
+             size + VGA_STACK_REDZONE_SZB );
 
    return True;
 }
@@ -679,8 +679,8 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT )
    else
       size = restore_rt_sigframe(tst, (struct rt_sigframe *)esp, &sigNo);
 
-   VG_TRACK( die_mem_stack_signal, esp - VGA_STACK_REDZONE_SIZE,
-             size + VGA_STACK_REDZONE_SIZE );
+   VG_TRACK( die_mem_stack_signal, esp - VGA_STACK_REDZONE_SZB,
+             size + VGA_STACK_REDZONE_SZB );
 
    if (VG_(clo_trace_signals))
       VG_(message)(
index d5a7f6668a615f30a91e8c5fb2b40ff404b4ca6b..36dd0dc703ca12fd6bf452cc91c1b53225a0563c 100644 (file)
@@ -205,7 +205,7 @@ void VG_(apply_StackTrace)( void(*action)(UInt n, Addr ip),
    do {
       Addr ip = ips[i];
       if (i > 0) 
-         ip -= VGA_MIN_INSTR_SIZE;  // point to calling line
+         ip -= VGA_MIN_INSTR_SZB;   // point to calling line
 
       // Stop after "main";  if main() is recursive, stop after last main().
       if ( ! VG_(clo_show_below_main)) {
index d763d67ac6062888ea36d3beb1a00e254382277d..4496b2025b7e6552dc2de099c93eb2e01265b58f 100644 (file)
@@ -797,7 +797,7 @@ void push_signal_frame ( ThreadId tid, const vki_siginfo_t *siginfo )
       VG_TRACK( pre_deliver_signal, tid, sigNo, /*alt_stack*/True );
       
    } else {
-      esp_top_of_frame = STACK_PTR(tst->arch) - VGA_STACK_REDZONE_SIZE;
+      esp_top_of_frame = STACK_PTR(tst->arch) - VGA_STACK_REDZONE_SZB;
 
       /* Signal delivery to tools */
       VG_TRACK( pre_deliver_signal, tid, sigNo, /*alt_stack*/False );
@@ -1831,14 +1831,14 @@ void sync_signalhandler ( Int sigNo, vki_siginfo_t *info, struct vki_ucontext *u
                         VG_(shadow_base), VG_(shadow_end));
       }
       if (info->si_code == 1 /* SEGV_MAPERR */
-         && fault >= (esp - VGA_STACK_REDZONE_SIZE)
+         && fault >= (esp - VGA_STACK_REDZONE_SZB)
           && fault < VG_(client_end)) {
         /* If the fault address is above esp but below the current known
            stack segment base, and it was a fault because there was
            nothing mapped there (as opposed to a permissions fault),
            then extend the stack segment. 
         */
-         Addr base = PGROUNDDN(esp - VGA_STACK_REDZONE_SIZE);
+         Addr base = PGROUNDDN(esp - VGA_STACK_REDZONE_SZB);
         if (VG_(extend_stack)(base, VG_(threads)[tid].client_stack_szB)) {
            if (VG_(clo_trace_signals))
               VG_(message)(Vg_DebugMsg, 
index c2a15db3f72171c1a406d6d28924fe9ec46f004b..fc48c6808903c8b6afb177a5cfd9ec754514b43a 100644 (file)
 #define VGA_REGPARM(n)  /* */
 
 
-#define VGA_MIN_INSTR_SIZE    1
-#define VGA_MAX_INSTR_SIZE   16
+#define VGA_MIN_INSTR_SZB     1
+#define VGA_MAX_INSTR_SZB    16
 
 
 /* How many bytes below the stack pointer are validly addressible?
    On amd64, the answer is: 128.
 */
-#define VGA_STACK_REDZONE_SIZE 128
+#define VGA_STACK_REDZONE_SZB    128
 
 
 #endif   // __AMD64_TOOL_ARCH_H
index 7e3165fbd27f70699dcaef96c03eb7a4da414912..383c0a5b7a77d312fa7bc5152537e23470377ac7 100644 (file)
@@ -36,8 +36,8 @@
 
 #define VGA_REGPARM(n)
 
-#define VGA_MIN_INSTR_SIZE    4
-#define VGA_MAX_INSTR_SIZE    4 
+#define VGA_MIN_INSTR_SZB     4
+#define VGA_MAX_INSTR_SZB     4 
 
 #endif   // __ARM_TOOL_ARCH_H
 
index 5d042f2a3bc8c3f3160a41e5fd8f5afb1dce4444..a98d4ce9c509e2d852a4116819069f895836aa1f 100644 (file)
 #define VGA_REGPARM(n)      __attribute__((regparm(n)))
 
 
-#define VGA_MIN_INSTR_SIZE    1
-#define VGA_MAX_INSTR_SIZE   16
+#define VGA_MIN_INSTR_SZB    1
+#define VGA_MAX_INSTR_SZB   16
 
 
 /* How many bytes below the stack pointer are validly addressible?
    On x86, the answer is: none.
 */
-#define VGA_STACK_REDZONE_SIZE 0
+#define VGA_STACK_REDZONE_SZB    0
 
 
 #endif   // __X86_TOOL_ARCH_H
index f6b0653ea9dbe66343735153cd829e4688551f07..6d07e44bc3572b56acdfc3abee2080871251c77e 100644 (file)
@@ -451,9 +451,9 @@ void VGA_REGPARM(1) MAC_(new_mem_stack_4)(Addr new_SP)            \
 {                                                                 \
    PROF_EVENT(110, "new_mem_stack_4");                            \
    if (VG_IS_4_ALIGNED(new_SP)) {                                 \
-      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP );         \
+      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP );          \
    } else {                                                       \
-      UNALIGNED_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP, 4 );      \
+      UNALIGNED_NEW ( -VGA_STACK_REDZONE_SZB + new_SP, 4 );       \
    }                                                              \
 }                                                                 \
                                                                   \
@@ -461,9 +461,9 @@ void VGA_REGPARM(1) MAC_(die_mem_stack_4)(Addr new_SP)            \
 {                                                                 \
    PROF_EVENT(120, "die_mem_stack_4");                            \
    if (VG_IS_4_ALIGNED(new_SP)) {                                 \
-      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-4 );       \
+      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-4 );        \
    } else {                                                       \
-      UNALIGNED_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-4, 4 );    \
+      UNALIGNED_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-4, 4 );     \
    }                                                              \
 }                                                                 \
                                                                   \
@@ -471,12 +471,12 @@ void VGA_REGPARM(1) MAC_(new_mem_stack_8)(Addr new_SP)            \
 {                                                                 \
    PROF_EVENT(111, "new_mem_stack_8");                            \
    if (VG_IS_8_ALIGNED(new_SP)) {                                 \
-      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP );         \
+      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP );          \
    } else if (VG_IS_4_ALIGNED(new_SP)) {                          \
-      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP   );       \
-      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP+4 );       \
+      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP   );        \
+      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP+4 );        \
    } else {                                                       \
-      UNALIGNED_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP, 8 );      \
+      UNALIGNED_NEW ( -VGA_STACK_REDZONE_SZB + new_SP, 8 );       \
    }                                                              \
 }                                                                 \
                                                                   \
@@ -484,12 +484,12 @@ void VGA_REGPARM(1) MAC_(die_mem_stack_8)(Addr new_SP)            \
 {                                                                 \
    PROF_EVENT(121, "die_mem_stack_8");                            \
    if (VG_IS_8_ALIGNED(new_SP)) {                                 \
-      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-8 );       \
+      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-8 );        \
    } else if (VG_IS_4_ALIGNED(new_SP)) {                          \
-      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-8 );       \
-      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-4 );       \
+      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-8 );        \
+      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-4 );        \
    } else {                                                       \
-      UNALIGNED_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-8, 8 );    \
+      UNALIGNED_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-8, 8 );     \
    }                                                              \
 }                                                                 \
                                                                   \
@@ -497,13 +497,13 @@ void VGA_REGPARM(1) MAC_(new_mem_stack_12)(Addr new_SP)           \
 {                                                                 \
    PROF_EVENT(112, "new_mem_stack_12");                           \
    if (VG_IS_8_ALIGNED(new_SP)) {                                 \
-      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP   );       \
-      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP+8 );       \
+      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP   );        \
+      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP+8 );        \
    } else if (VG_IS_4_ALIGNED(new_SP)) {                          \
-      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP   );       \
-      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP+4 );       \
+      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP   );        \
+      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP+4 );        \
    } else {                                                       \
-      UNALIGNED_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP, 12 );     \
+      UNALIGNED_NEW ( -VGA_STACK_REDZONE_SZB + new_SP, 12 );      \
    }                                                              \
 }                                                                 \
                                                                   \
@@ -512,13 +512,13 @@ void VGA_REGPARM(1) MAC_(die_mem_stack_12)(Addr new_SP)           \
    PROF_EVENT(122, "die_mem_stack_12");                           \
    /* Note the -12 in the test */                                 \
    if (VG_IS_8_ALIGNED(new_SP-12)) {                              \
-      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-12 );      \
-      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-4  );      \
+      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-12 );       \
+      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-4  );       \
    } else if (VG_IS_4_ALIGNED(new_SP)) {                          \
-      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-12 );      \
-      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-8  );      \
+      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-12 );       \
+      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-8  );       \
    } else {                                                       \
-      UNALIGNED_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-12, 12 );  \
+      UNALIGNED_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-12, 12 );   \
    }                                                              \
 }                                                                 \
                                                                   \
@@ -526,14 +526,14 @@ void VGA_REGPARM(1) MAC_(new_mem_stack_16)(Addr new_SP)           \
 {                                                                 \
    PROF_EVENT(113, "new_mem_stack_16");                           \
    if (VG_IS_8_ALIGNED(new_SP)) {                                 \
-      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP   );       \
-      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP+8 );       \
+      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP   );        \
+      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP+8 );        \
    } else if (VG_IS_4_ALIGNED(new_SP)) {                          \
-      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP    );      \
-      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP+4  );      \
-      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP+12 );      \
+      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP    );       \
+      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP+4  );       \
+      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP+12 );       \
    } else {                                                       \
-      UNALIGNED_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP, 16 );     \
+      UNALIGNED_NEW ( -VGA_STACK_REDZONE_SZB + new_SP, 16 );      \
    }                                                              \
 }                                                                 \
                                                                   \
@@ -541,14 +541,14 @@ void VGA_REGPARM(1) MAC_(die_mem_stack_16)(Addr new_SP)           \
 {                                                                 \
    PROF_EVENT(123, "die_mem_stack_16");                           \
    if (VG_IS_8_ALIGNED(new_SP)) {                                 \
-      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-16 );      \
-      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-8  );      \
+      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-16 );       \
+      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-8  );       \
    } else if (VG_IS_4_ALIGNED(new_SP)) {                          \
-      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-16 );      \
-      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-12 );      \
-      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-4  );      \
+      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-16 );       \
+      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-12 );       \
+      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-4  );       \
    } else {                                                       \
-      UNALIGNED_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-16, 16 );  \
+      UNALIGNED_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-16, 16 );   \
    }                                                              \
 }                                                                 \
                                                                   \
@@ -556,18 +556,18 @@ void VGA_REGPARM(1) MAC_(new_mem_stack_32)(Addr new_SP)           \
 {                                                                 \
    PROF_EVENT(114, "new_mem_stack_32");                           \
    if (VG_IS_8_ALIGNED(new_SP)) {                                 \
-      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP    );      \
-      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP+8  );      \
-      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP+16 );      \
-      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP+24 );      \
+      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP    );       \
+      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP+8  );       \
+      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP+16 );       \
+      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP+24 );       \
    } else if (VG_IS_4_ALIGNED(new_SP)) {                          \
-      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP    );      \
-      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP+4  );      \
-      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP+12 );      \
-      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP+20 );      \
-      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SIZE + new_SP+28 );      \
+      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP    );       \
+      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP+4  );       \
+      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP+12 );       \
+      ALIGNED8_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP+20 );       \
+      ALIGNED4_NEW  ( -VGA_STACK_REDZONE_SZB + new_SP+28 );       \
    } else {                                                       \
-      UNALIGNED_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP, 32 );     \
+      UNALIGNED_NEW ( -VGA_STACK_REDZONE_SZB + new_SP, 32 );      \
    }                                                              \
 }                                                                 \
                                                                   \
@@ -575,31 +575,31 @@ void VGA_REGPARM(1) MAC_(die_mem_stack_32)(Addr new_SP)           \
 {                                                                 \
    PROF_EVENT(124, "die_mem_stack_32");                           \
    if (VG_IS_8_ALIGNED(new_SP)) {                                 \
-      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-32 );      \
-      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-24 );      \
-      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-16 );      \
-      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP- 8 );      \
+      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-32 );       \
+      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-24 );       \
+      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-16 );       \
+      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP- 8 );       \
    } else if (VG_IS_4_ALIGNED(new_SP)) {                          \
-      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-32 );      \
-      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-28 );      \
-      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-20 );      \
-      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-12 );      \
-      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SIZE + new_SP-4  );      \
+      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-32 );       \
+      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-28 );       \
+      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-20 );       \
+      ALIGNED8_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-12 );       \
+      ALIGNED4_DIE  ( -VGA_STACK_REDZONE_SZB + new_SP-4  );       \
    } else {                                                       \
-      UNALIGNED_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-32, 32 );  \
+      UNALIGNED_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-32, 32 );   \
    }                                                              \
 }                                                                 \
                                                                   \
 void MAC_(new_mem_stack) ( Addr a, SizeT len )                    \
 {                                                                 \
    PROF_EVENT(115, "new_mem_stack");                              \
-   UNALIGNED_NEW ( -VGA_STACK_REDZONE_SIZE + a, len );            \
+   UNALIGNED_NEW ( -VGA_STACK_REDZONE_SZB + a, len );             \
 }                                                                 \
                                                                   \
 void MAC_(die_mem_stack) ( Addr a, SizeT len )                    \
 {                                                                 \
    PROF_EVENT(125, "die_mem_stack");                              \
-   UNALIGNED_DIE ( -VGA_STACK_REDZONE_SIZE + a, len );            \
+   UNALIGNED_DIE ( -VGA_STACK_REDZONE_SZB + a, len );             \
 }
 
 #endif   /* __MAC_SHARED_H */