]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make --partial-loads-ok=yes the default on all platforms, not just OS X.
authorJulian Seward <jseward@acm.org>
Mon, 31 Aug 2015 10:36:02 +0000 (10:36 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 31 Aug 2015 10:36:02 +0000 (10:36 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15600

memcheck/docs/mc-manual.xml
memcheck/mc_main.c
memcheck/tests/partial_load_dflt.stderr.exp
memcheck/tests/partial_load_dflt.stderr.exp64
memcheck/tests/test-plo-no.vgtest

index 1aa7eff3ec7bcdab6aa19a11f249712f85d5f5bb..170fe1ddb8664d5c194e1f3b991a8257fd4f8211 100644 (file)
@@ -947,7 +947,7 @@ is <option>--errors-for-leak-kinds=definite,possible</option>
 
   <varlistentry id="opt.partial-loads-ok" xreflabel="--partial-loads-ok">
     <term>
-      <option><![CDATA[--partial-loads-ok=<yes|no> [default: no] ]]></option>
+      <option><![CDATA[--partial-loads-ok=<yes|no> [default: yes] ]]></option>
     </term>
     <listitem>
       <para>Controls how Memcheck handles 32-, 64-, 128- and 256-bit
@@ -965,8 +965,7 @@ is <option>--errors-for-leak-kinds=definite,possible</option>
 
       <para>Note that code that behaves in this way is in violation of
       the ISO C/C++ standards, and should be considered broken.  If
-      at all possible, such code should be fixed.  This option should be
-      used only as a last resort.</para>
+      at all possible, such code should be fixed.</para>
     </listitem>
   </varlistentry>
 
index e3ed7139a52a19450465917ee60918fdd0687874..6a00aa77a313d29e04e4473b0607390941df5257 100644 (file)
@@ -5689,15 +5689,10 @@ static Bool mc_expensive_sanity_check ( void )
 /*--- Command line args                                    ---*/
 /*------------------------------------------------------------*/
 
-/* --partial-loads-ok: enable by default on MacOS.  The MacOS system
-   graphics libraries are heavily vectorised, and not enabling this by
-   default causes lots of false errors. */
-#if defined(VGO_darwin)
+/* 31 Aug 2015: Vectorised code is now so widespread that
+   --partial-loads-ok needs to be enabled by default on all platforms.
+   Not doing so causes lots of false errors. */
 Bool          MC_(clo_partial_loads_ok)       = True;
-#else
-Bool          MC_(clo_partial_loads_ok)       = False;
-#endif
-
 Long          MC_(clo_freelist_vol)           = 20*1000*1000LL;
 Long          MC_(clo_freelist_big_blocks)    =  1*1000*1000LL;
 LeakCheckMode MC_(clo_leak_check)             = LC_Summary;
@@ -5874,11 +5869,6 @@ static Bool mc_process_cmd_line_options(const HChar* arg)
 
 static void mc_print_usage(void)
 {
-   const HChar* plo_default = "no";
-#  if defined(VGO_darwin)
-   plo_default = "yes";
-#  endif
-
    VG_(printf)(
 "    --leak-check=no|summary|full     search for memory leaks at exit?  [summary]\n"
 "    --leak-resolution=low|med|high   differentiation of leak stack traces [high]\n"
@@ -5899,7 +5889,7 @@ static void mc_print_usage(void)
 "                                     same as --show-leak-kinds=definite\n"
 "    --undef-value-errors=no|yes      check for undefined value errors [yes]\n"
 "    --track-origins=no|yes           show origins of undefined values? [no]\n"
-"    --partial-loads-ok=no|yes        too hard to explain here; see manual [%s]\n"
+"    --partial-loads-ok=no|yes        too hard to explain here; see manual [yes]\n"
 "    --freelist-vol=<number>          volume of freed blocks queue     [20000000]\n"
 "    --freelist-big-blocks=<number>   releases first blocks with size>= [1000000]\n"
 "    --workaround-gcc296-bugs=no|yes  self explanatory [no]\n"
@@ -5909,7 +5899,6 @@ static void mc_print_usage(void)
 "    --keep-stacktraces=alloc|free|alloc-and-free|alloc-then-free|none\n"
 "        stack trace(s) to keep for malloc'd/free'd areas       [alloc-and-free]\n"
 "    --show-mismatched-frees=no|yes   show frees that don't match the allocator? [yes]\n"
-, plo_default
    );
 }
 
index 871f6512b91f3b9eb79c56e9f944d801813e804b..fdb4a338e56cb13f4af9ac2cc5d888b95bad13e0 100644 (file)
@@ -1,10 +1,4 @@
 
-Invalid read of size 4
-   at 0x........: main (partial_load.c:16)
- Address 0x........ is 0 bytes inside a block of size 3 alloc'd
-   at 0x........: calloc (vg_replace_malloc.c:...)
-   by 0x........: main (partial_load.c:14)
-
 Invalid read of size 4
    at 0x........: main (partial_load.c:23)
  Address 0x........ is 1 bytes inside a block of size 4 alloc'd
@@ -31,4 +25,4 @@ HEAP SUMMARY:
 For a detailed leak analysis, rerun with: --leak-check=full
 
 For counts of detected and suppressed errors, rerun with: -v
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
index 8873a2542b045aa59e690140d5e3b55b6c5c931e..a57d9aa0d15fd899083888394b6fdf911151676c 100644 (file)
@@ -1,10 +1,4 @@
 
-Invalid read of size 8
-   at 0x........: main (partial_load.c:16)
- Address 0x........ is 0 bytes inside a block of size 7 alloc'd
-   at 0x........: calloc (vg_replace_malloc.c:...)
-   by 0x........: main (partial_load.c:14)
-
 Invalid read of size 8
    at 0x........: main (partial_load.c:23)
  Address 0x........ is 1 bytes inside a block of size 8 alloc'd
@@ -31,4 +25,4 @@ HEAP SUMMARY:
 For a detailed leak analysis, rerun with: --leak-check=full
 
 For counts of detected and suppressed errors, rerun with: -v
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
index 14d4be32e46eea06cad9e7c0c427f2fa4f8d6c08..cbe322cbc7235e862c304e14ddf4f73512d06c99 100644 (file)
@@ -1,2 +1,2 @@
 prog: test-plo
-vgopts: -q --keep-stacktraces=alloc-then-free
+vgopts: -q --partial-loads-ok=no --keep-stacktraces=alloc-then-free