Commits

Amaury Forgeot d'Arc committed d8ba553 Merge

hg merge default again

Comments (0)

Files changed (3)

pypy/module/posix/__init__.py

         'lstat': 'interp_posix.lstat',
         'stat_float_times': 'interp_posix.stat_float_times',
 
-        'fstatvfs': 'interp_posix.fstatvfs',
-        'statvfs': 'interp_posix.statvfs',
-
         'dup': 'interp_posix.dup',
         'dup2': 'interp_posix.dup2',
         'access': 'interp_posix.access',
             ttyname chmod fchmod chown lchown fchown chroot link symlink readlink
             ftruncate getloadavg nice uname execv execve fork spawnv spawnve
             putenv unsetenv fchdir fsync fdatasync mknod
+            fstatvfs statvfs
             openpty forkpty mkfifo getlogin sysconf fpathconf
             getsid getuid geteuid getgid getegid getpgrp getpgid
             setsid setuid seteuid setgid setegid setpgrp setpgid

rpython/jit/backend/x86/assembler.py

         self.mc.RET()
 
     def _load_shadowstack_top_in_ebx(self, mc, gcrootmap):
+        """Loads the shadowstack top in ebx, and returns an integer
+        that gives the address of the stack top.  If this integer doesn't
+        fit in 32 bits, it will be loaded in r11.
+        """
         rst = gcrootmap.get_root_stack_top_addr()
         if rx86.fits_in_32bits(rst):
             mc.MOV_rj(ebx.value, rst)            # MOV ebx, [rootstacktop]
         if rx86.fits_in_32bits(rst):
             self.mc.MOV_jr(rst, ebx.value)            # MOV [rootstacktop], ebx
         else:
+            # The integer 'rst' doesn't fit in 32 bits, so we know that
+            # _load_shadowstack_top_in_ebx() above loaded it in r11.
+            # Reuse it.  Be careful not to overwrite r11 in the middle!
             self.mc.MOV_mr((X86_64_SCRATCH_REG.value, 0),
                            ebx.value) # MOV [r11], ebx
 

rpython/rlib/rposix.py

 else:
     separate_module_sources = []
     export_symbols = []
-    includes=['errno.h', 'stdio.h', 'stdlib.h', 'unistd.h', 'sys/stat.h',
+    includes=['errno.h', 'stdio.h', 'stdlib.h', 'unistd.h',
+              'sys/stat.h', 'sys/statvfs.h',
               'fcntl.h', 'signal.h', 'pty.h', 'sys/utsname.h', 'sys/wait.h',
               'sysexits.h', 'limits.h']
 rposix_eci = ExternalCompilationInfo(
         ttyname chmod fchmod chown lchown fchown chroot link symlink readlink
         ftruncate getloadavg nice uname execv execve fork spawnv spawnve
         putenv unsetenv fchdir fsync fdatasync mknod
+        fstatvfs statvfs
         openpty forkpty mkfifo getlogin sysconf fpathconf
         getsid getuid geteuid getgid getegid getpgrp getpgid
         setsid setuid seteuid setgid setegid setpgrp setpgid