Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix the stack cleaner
authorGabriel Corona <gabriel.corona@loria.fr>
Mon, 24 Nov 2014 12:19:14 +0000 (13:19 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Mon, 24 Nov 2014 13:16:18 +0000 (14:16 +0100)
The condition was broken and the %rsp limit was too high.

tools/stack-cleaner/clean-stack-filter

index a7c87fe..95a3b52 100755 (executable)
@@ -26,9 +26,9 @@ sub emit_code {
       # This is a crude hack to disable the stack cleaning on the main
       # stack.  It rellies on the fact that the main stack is high in
       # the address space and the other stacks are in the hap (lower).
       # This is a crude hack to disable the stack cleaning on the main
       # stack.  It rellies on the fact that the main stack is high in
       # the address space and the other stacks are in the hap (lower).
-      print("\tmovq \$0x7ffff7ff8000, %r11\n");
+      print("\tmovq \$0x7fff00000000, %r11\n");
       print("\tcmpq %r11, %rsp\n");
       print("\tcmpq %r11, %rsp\n");
-      print("\tjbe .Lstack_cleaner_done$id\n");
+      print("\tjae .Lstack_cleaner_done$id\n");
 
       # Loop over the stack frame quadwords and zero it:
       print("\tmovabsq \$$qsize, %r11\n");
 
       # Loop over the stack frame quadwords and zero it:
       print("\tmovabsq \$$qsize, %r11\n");