Fix bugs in leak checker.
authorBen Pfaff <blp@nicira.com>
Tue, 13 Jan 2009 23:10:11 +0000 (15:10 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 13 Jan 2009 23:10:11 +0000 (15:10 -0800)
Oops.

lib/leak-checker.c

index defc1edbb3e141cb7f92710742c09713ef011b7a..bdff32478e36cc1a8aa7e6cb887bbd5c37a3b70e 100644 (file)
@@ -143,7 +143,7 @@ leak_checker_usage(void)
 }
 
 static uintptr_t UNUSED
-read_maps(void)
+get_max_stack(void)
 {
     static const char file_name[] = "/proc/self/maps";
     char line[1024];
@@ -176,7 +176,7 @@ read_maps(void)
 static void
 get_stack_limits(uintptr_t *lowp, uintptr_t *highp)
 {
-#ifndef __x86__
+#ifndef __i386__
     static bool warned = false;
     if (!warned) {
         warned = true;
@@ -190,7 +190,7 @@ get_stack_limits(uintptr_t *lowp, uintptr_t *highp)
     if (!high) {
         high = get_max_stack();
     }
-    asm("movl %%esp,%0" : "g" (*lowp));
+    asm("movl %%esp,%0" : "=g" (*lowp));
     *highp = high;
 #endif
 }