Valgrind: r16383 - in /trunk: NEWS configure.ac coregrind/link_tool_exe_darwin.in coregrind/m_aspacemgr/aspacemgr-linux.c coregrind/m_gdbserver/server.c docs/xml/manual-core-adv.xml

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Valgrind: r16383 - in /trunk: NEWS configure.ac coregrind/link_tool_exe_darwin.in coregrind/m_aspacemgr/aspacemgr-linux.c coregrind/m_gdbserver/server.c docs/xml/manual-core-adv.xml

svn-2
Author: iraisr
Date: Tue May 16 09:22:51 2017
New Revision: 16383

Log:
Increase Valgrind's load address to prevent mmap failure.
Fixes BZ#374963.

Previously Valgrind failed to start when the executable contained
large text, data or bss segments. The load address was increased
for almost all platforms to 0x58000000 (from 0x38000000),
giving another 512 MB for the executable.

Modified:
    trunk/NEWS
    trunk/configure.ac
    trunk/coregrind/link_tool_exe_darwin.in
    trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
    trunk/coregrind/m_gdbserver/server.c
    trunk/docs/xml/manual-core-adv.xml

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Tue May 16 09:22:51 2017
@@ -152,6 +152,7 @@
 373555  Rename BBPTR to GSPTR as it denotes guest state pointer only
 373938  const IRExpr arguments for matchIRExpr()
 374719  some spelling fixes
+374963  increase valgrind's load address to prevent mmap failure
 375514  valgrind_get_tls_addr() does not work in case of static TLS
 375772  +1 error in get_elf_symbol_info() when computing value of 'hi' address
         for ML_(find_rx_mapping)()

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue May 16 09:22:51 2017
@@ -522,8 +522,8 @@
         VGCONF_ARCH_SEC=""
  VGCONF_PLATFORM_PRI_CAPS="X86_LINUX"
  VGCONF_PLATFORM_SEC_CAPS=""
-        valt_load_address_pri_norml="0x38000000"
-        valt_load_address_pri_inner="0x28000000"
+        valt_load_address_pri_norml="0x58000000"
+        valt_load_address_pri_inner="0x38000000"
         valt_load_address_sec_norml="0xUNSET"
         valt_load_address_sec_inner="0xUNSET"
         AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
@@ -536,24 +536,24 @@
            VGCONF_ARCH_SEC=""
    VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX"
    VGCONF_PLATFORM_SEC_CAPS=""
-           valt_load_address_pri_norml="0x38000000"
-           valt_load_address_pri_inner="0x28000000"
+           valt_load_address_pri_norml="0x58000000"
+           valt_load_address_pri_inner="0x38000000"
  elif test x$vg_cv_only32bit = xyes; then
    VGCONF_ARCH_PRI="x86"
            VGCONF_ARCH_SEC=""
    VGCONF_PLATFORM_PRI_CAPS="X86_LINUX"
    VGCONF_PLATFORM_SEC_CAPS=""
-           valt_load_address_pri_norml="0x38000000"
-           valt_load_address_pri_inner="0x28000000"
+           valt_load_address_pri_norml="0x58000000"
+           valt_load_address_pri_inner="0x38000000"
  else
            VGCONF_ARCH_PRI="amd64"
            VGCONF_ARCH_SEC="x86"
    VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX"
    VGCONF_PLATFORM_SEC_CAPS="X86_LINUX"
-           valt_load_address_pri_norml="0x38000000"
-           valt_load_address_pri_inner="0x28000000"
-           valt_load_address_sec_norml="0x38000000"
-           valt_load_address_sec_inner="0x28000000"
+           valt_load_address_pri_norml="0x58000000"
+           valt_load_address_pri_inner="0x38000000"
+           valt_load_address_sec_norml="0x58000000"
+           valt_load_address_sec_inner="0x38000000"
  fi
         AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
  ;;
@@ -562,8 +562,8 @@
         VGCONF_ARCH_SEC=""
  VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX"
  VGCONF_PLATFORM_SEC_CAPS=""
-        valt_load_address_pri_norml="0x38000000"
-        valt_load_address_pri_inner="0x28000000"
+        valt_load_address_pri_norml="0x58000000"
+        valt_load_address_pri_inner="0x38000000"
         valt_load_address_sec_norml="0xUNSET"
         valt_load_address_sec_inner="0xUNSET"
         AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
@@ -576,24 +576,24 @@
            VGCONF_ARCH_SEC=""
    VGCONF_PLATFORM_PRI_CAPS="PPC64BE_LINUX"
    VGCONF_PLATFORM_SEC_CAPS=""
-           valt_load_address_pri_norml="0x38000000"
-           valt_load_address_pri_inner="0x28000000"
+           valt_load_address_pri_norml="0x58000000"
+           valt_load_address_pri_inner="0x38000000"
  elif test x$vg_cv_only32bit = xyes; then
    VGCONF_ARCH_PRI="ppc32"
            VGCONF_ARCH_SEC=""
    VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX"
    VGCONF_PLATFORM_SEC_CAPS=""
-           valt_load_address_pri_norml="0x38000000"
-           valt_load_address_pri_inner="0x28000000"
+           valt_load_address_pri_norml="0x58000000"
+           valt_load_address_pri_inner="0x38000000"
  else
    VGCONF_ARCH_PRI="ppc64be"
            VGCONF_ARCH_SEC="ppc32"
    VGCONF_PLATFORM_PRI_CAPS="PPC64BE_LINUX"
    VGCONF_PLATFORM_SEC_CAPS="PPC32_LINUX"
-           valt_load_address_pri_norml="0x38000000"
-           valt_load_address_pri_inner="0x28000000"
-           valt_load_address_sec_norml="0x38000000"
-           valt_load_address_sec_inner="0x28000000"
+           valt_load_address_pri_norml="0x58000000"
+           valt_load_address_pri_inner="0x38000000"
+           valt_load_address_sec_norml="0x58000000"
+           valt_load_address_sec_inner="0x38000000"
  fi
         AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
  ;;
@@ -605,8 +605,8 @@
         VGCONF_ARCH_SEC=""
         VGCONF_PLATFORM_PRI_CAPS="PPC64LE_LINUX"
         VGCONF_PLATFORM_SEC_CAPS=""
-        valt_load_address_pri_norml="0x38000000"
-        valt_load_address_pri_inner="0x28000000"
+        valt_load_address_pri_norml="0x58000000"
+        valt_load_address_pri_inner="0x38000000"
         AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
        ;;
      # Darwin gets identified as 32-bit even when it supports 64-bit.
@@ -623,25 +623,25 @@
            VGCONF_ARCH_SEC=""
    VGCONF_PLATFORM_PRI_CAPS="AMD64_DARWIN"
    VGCONF_PLATFORM_SEC_CAPS=""
-           valt_load_address_pri_norml="0x138000000"
-           valt_load_address_pri_inner="0x128000000"
+           valt_load_address_pri_norml="0x158000000"
+           valt_load_address_pri_inner="0x138000000"
  elif test x$vg_cv_only32bit = xyes; then
            VGCONF_ARCH_PRI="x86"
            VGCONF_ARCH_SEC=""
    VGCONF_PLATFORM_PRI_CAPS="X86_DARWIN"
    VGCONF_PLATFORM_SEC_CAPS=""
    VGCONF_ARCH_PRI_CAPS="x86"
-           valt_load_address_pri_norml="0x38000000"
-           valt_load_address_pri_inner="0x28000000"
+           valt_load_address_pri_norml="0x58000000"
+           valt_load_address_pri_inner="0x38000000"
  else
            VGCONF_ARCH_PRI="amd64"
            VGCONF_ARCH_SEC="x86"
    VGCONF_PLATFORM_PRI_CAPS="AMD64_DARWIN"
    VGCONF_PLATFORM_SEC_CAPS="X86_DARWIN"
-           valt_load_address_pri_norml="0x138000000"
-           valt_load_address_pri_inner="0x128000000"
-           valt_load_address_sec_norml="0x38000000"
-           valt_load_address_sec_inner="0x28000000"
+           valt_load_address_pri_norml="0x158000000"
+           valt_load_address_pri_inner="0x138000000"
+           valt_load_address_sec_norml="0x58000000"
+           valt_load_address_sec_inner="0x38000000"
  fi
         AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
  ;;
@@ -649,8 +649,8 @@
  VGCONF_ARCH_PRI="arm"
  VGCONF_PLATFORM_PRI_CAPS="ARM_LINUX"
  VGCONF_PLATFORM_SEC_CAPS=""
- valt_load_address_pri_norml="0x38000000"
- valt_load_address_pri_inner="0x28000000"
+ valt_load_address_pri_norml="0x58000000"
+ valt_load_address_pri_inner="0x38000000"
         valt_load_address_sec_norml="0xUNSET"
         valt_load_address_sec_inner="0xUNSET"
  AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
@@ -663,24 +663,24 @@
            VGCONF_ARCH_SEC=""
            VGCONF_PLATFORM_PRI_CAPS="ARM64_LINUX"
            VGCONF_PLATFORM_SEC_CAPS=""
-           valt_load_address_pri_norml="0x38000000"
-           valt_load_address_pri_inner="0x28000000"
+           valt_load_address_pri_norml="0x58000000"
+           valt_load_address_pri_inner="0x38000000"
         elif test x$vg_cv_only32bit = xyes; then
            VGCONF_ARCH_PRI="arm"
            VGCONF_ARCH_SEC=""
            VGCONF_PLATFORM_PRI_CAPS="ARM_LINUX"
            VGCONF_PLATFORM_SEC_CAPS=""
-           valt_load_address_pri_norml="0x38000000"
-           valt_load_address_pri_inner="0x28000000"
+           valt_load_address_pri_norml="0x58000000"
+           valt_load_address_pri_inner="0x38000000"
         else
            VGCONF_ARCH_PRI="arm64"
            VGCONF_ARCH_SEC="arm"
            VGCONF_PLATFORM_PRI_CAPS="ARM64_LINUX"
            VGCONF_PLATFORM_SEC_CAPS="ARM_LINUX"
-           valt_load_address_pri_norml="0x38000000"
-           valt_load_address_pri_inner="0x28000000"
-           valt_load_address_sec_norml="0x38000000"
-           valt_load_address_sec_inner="0x28000000"
+           valt_load_address_pri_norml="0x58000000"
+           valt_load_address_pri_inner="0x38000000"
+           valt_load_address_sec_norml="0x58000000"
+           valt_load_address_sec_inner="0x38000000"
         fi
         AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
         ;;
@@ -701,8 +701,8 @@
         VGCONF_ARCH_PRI="mips32"
         VGCONF_PLATFORM_PRI_CAPS="MIPS32_LINUX"
         VGCONF_PLATFORM_SEC_CAPS=""
-        valt_load_address_pri_norml="0x38000000"
-        valt_load_address_pri_inner="0x28000000"
+        valt_load_address_pri_norml="0x58000000"
+        valt_load_address_pri_inner="0x38000000"
         valt_load_address_sec_norml="0xUNSET"
         valt_load_address_sec_inner="0xUNSET"
         AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
@@ -711,8 +711,8 @@
         VGCONF_ARCH_PRI="mips64"
         VGCONF_PLATFORM_PRI_CAPS="MIPS64_LINUX"
         VGCONF_PLATFORM_SEC_CAPS=""
-        valt_load_address_pri_norml="0x38000000"
-        valt_load_address_pri_inner="0x28000000"
+        valt_load_address_pri_norml="0x58000000"
+        valt_load_address_pri_inner="0x38000000"
         valt_load_address_sec_norml="0xUNSET"
         valt_load_address_sec_inner="0xUNSET"
         AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
@@ -722,8 +722,8 @@
         VGCONF_ARCH_SEC=""
         VGCONF_PLATFORM_PRI_CAPS="X86_SOLARIS"
         VGCONF_PLATFORM_SEC_CAPS=""
-        valt_load_address_pri_norml="0x38000000"
-        valt_load_address_pri_inner="0x28000000"
+        valt_load_address_pri_norml="0x58000000"
+        valt_load_address_pri_inner="0x38000000"
         valt_load_address_sec_norml="0xUNSET"
         valt_load_address_sec_inner="0xUNSET"
         AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
@@ -736,24 +736,24 @@
            VGCONF_ARCH_SEC=""
            VGCONF_PLATFORM_PRI_CAPS="AMD64_SOLARIS"
            VGCONF_PLATFORM_SEC_CAPS=""
-           valt_load_address_pri_norml="0x38000000"
-           valt_load_address_pri_inner="0x28000000"
+           valt_load_address_pri_norml="0x58000000"
+           valt_load_address_pri_inner="0x38000000"
         elif test x$vg_cv_only32bit = xyes; then
            VGCONF_ARCH_PRI="x86"
            VGCONF_ARCH_SEC=""
            VGCONF_PLATFORM_PRI_CAPS="X86_SOLARIS"
            VGCONF_PLATFORM_SEC_CAPS=""
-           valt_load_address_pri_norml="0x38000000"
-           valt_load_address_pri_inner="0x28000000"
+           valt_load_address_pri_norml="0x58000000"
+           valt_load_address_pri_inner="0x38000000"
         else
            VGCONF_ARCH_PRI="amd64"
            VGCONF_ARCH_SEC="x86"
            VGCONF_PLATFORM_PRI_CAPS="AMD64_SOLARIS"
            VGCONF_PLATFORM_SEC_CAPS="X86_SOLARIS"
-           valt_load_address_pri_norml="0x38000000"
-           valt_load_address_pri_inner="0x28000000"
-           valt_load_address_sec_norml="0x38000000"
-           valt_load_address_sec_inner="0x28000000"
+           valt_load_address_pri_norml="0x58000000"
+           valt_load_address_pri_inner="0x38000000"
+           valt_load_address_sec_norml="0x58000000"
+           valt_load_address_sec_inner="0x38000000"
         fi
         AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
         ;;

Modified: trunk/coregrind/link_tool_exe_darwin.in
==============================================================================
--- trunk/coregrind/link_tool_exe_darwin.in (original)
+++ trunk/coregrind/link_tool_exe_darwin.in Tue May 16 09:22:51 2017
@@ -38,7 +38,7 @@
 #
 #   /usr/bin/ld -static -arch x86_64 -macosx_version_min 10.6 \
 #      -o memcheck-amd64-darwin -u __start -e __start \
-#      -image_base 0x138000000 -stack_addr 0x13c000000 \
+#      -image_base 0x158000000 -stack_addr 0x13c000000 \
 #      -stack_size 0x800000 \
 #      memcheck_amd*.o \
 #      ../coregrind/libcoregrind-amd64-darwin.a \
@@ -48,7 +48,7 @@
 #
 #   /usr/bin/ld -static -arch i386 -macosx_version_min 10.6 \
 #      -o memcheck-x86-darwin -u __start -e __start \
-#      -image_base 0x38000000 -stack_addr 0x3c000000 \
+#      -image_base 0x58000000 -stack_addr 0x3c000000 \
 #      -stack_size 0x800000 \
 #      memcheck_x86*.o \
 #      ../coregrind/libcoregrind-x86-darwin.a \

Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Tue May 16 09:22:51 2017
@@ -1655,7 +1655,7 @@
       |                                |
       |--------------------------------|
       |          client stack          |
-      |--------------------------------| 0x38000000
+      |--------------------------------| 0x58000000
       |            V's text            |
       |--------------------------------|
       |                                |
@@ -1688,7 +1688,7 @@
       |                                |
       |--------------------------------|
       |          client stack          |
-      |--------------------------------| 0x00000000_38000000
+      |--------------------------------| 0x00000000_58000000
       |            V's text            |
       |--------------------------------|
       |                                |
@@ -1723,9 +1723,9 @@
 
    aspacem_cStart = aspacem_minAddr;
 #  ifdef ENABLE_INNER
-   suggested_clstack_end = (Addr) 0x27ff0000 - 1; // 64kB below V's text
-#  else
    suggested_clstack_end = (Addr) 0x37ff0000 - 1; // 64kB below V's text
+#  else
+   suggested_clstack_end = (Addr) 0x57ff0000 - 1; // 64kB below V's text
 #  endif
 
    // --- Linux --------------------------------------------

Modified: trunk/coregrind/m_gdbserver/server.c
==============================================================================
--- trunk/coregrind/m_gdbserver/server.c (original)
+++ trunk/coregrind/m_gdbserver/server.c Tue May 16 09:22:51 2017
@@ -339,7 +339,7 @@
                do not, suggest a 'likely somewhat working' address: */
             const Addr tool_text_start
                = tooldi ?
-               VG_(DebugInfo_get_text_avma) (tooldi) : 0x38000000;
+               VG_(DebugInfo_get_text_avma) (tooldi) : 0x58000000;
             const NSegment *toolseg
                = tooldi ?
                  VG_(am_find_nsegment) (VG_(DebugInfo_get_text_avma) (tooldi))

Modified: trunk/docs/xml/manual-core-adv.xml
==============================================================================
--- trunk/docs/xml/manual-core-adv.xml (original)
+++ trunk/docs/xml/manual-core-adv.xml Tue May 16 09:22:51 2017
@@ -1516,9 +1516,9 @@
 
 <screen><![CDATA[
 (gdb) monitor v.set hostvisibility yes
-(gdb) add-symbol-file /path/to/tool/executable/file/memcheck-x86-linux 0x38000000
+(gdb) add-symbol-file /path/to/tool/executable/file/memcheck-x86-linux 0x58000000
 add symbol table from file "/path/to/tool/executable/file/memcheck-x86-linux" at
- .text_addr = 0x38000000
+ .text_addr = 0x58000000
 (y or n) y
 Reading symbols from /path/to/tool/executable/file/memcheck-x86-linux...done.
 (gdb)


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers