X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9b0df95ed22e6c747e2087b0d47f4af95f7abec5..1a449d04f5f06f7a6071c046b1881d0c5b3bc221:/tools/stack-cleaner/clean-stack-filter diff --git a/tools/stack-cleaner/clean-stack-filter b/tools/stack-cleaner/clean-stack-filter index a7c87fe117..64e79903c5 100755 --- a/tools/stack-cleaner/clean-stack-filter +++ b/tools/stack-cleaner/clean-stack-filter @@ -1,9 +1,10 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # Transform assembly in order to clean each stack frame for X86_64. use strict; -$SIG{__WARN__} = sub { die @_ }; +use warnings; +$SIG{__WARN__} = sub { die @_ }; # Whether we are still scanning the content of a function: our $scanproc = 0; @@ -24,11 +25,11 @@ sub emit_code { if($size != 0) { # 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"); + # stack. It relies on the fact that the main stack is high in + # the address space and the other stacks are in the heap (lower). + print("\tmovq \$0x7fff00000000, %r11\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");