Skip to content

Commit 6154623

Browse files
author
sewardj
committed
Change the default setting --partial-loads-ok from "no" to "yes"
for Mac OS only. All other targets remain at "no". git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14144 a5019735-40e9-0310-863c-91ae7b9d1cf9
1 parent c5e9175 commit 6154623

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

memcheck/mc_main.c

+16-3
Original file line numberDiff line numberDiff line change
@@ -5173,8 +5173,15 @@ static Bool mc_expensive_sanity_check ( void )
51735173
/*--- Command line args ---*/
51745174
/*------------------------------------------------------------*/
51755175

5176-
5176+
/* --partial-loads-ok: enable by default on MacOS. The MacOS system
5177+
graphics libraries are heavily vectorised, and not enabling this by
5178+
default causes lots of false errors. */
5179+
#if defined(VGO_darwin)
5180+
Bool MC_(clo_partial_loads_ok) = True;
5181+
#else
51775182
Bool MC_(clo_partial_loads_ok) = False;
5183+
#endif
5184+
51785185
Long MC_(clo_freelist_vol) = 20*1000*1000LL;
51795186
Long MC_(clo_freelist_big_blocks) = 1*1000*1000LL;
51805187
LeakCheckMode MC_(clo_leak_check) = LC_Summary;
@@ -5347,7 +5354,12 @@ static Bool mc_process_cmd_line_options(const HChar* arg)
53475354
}
53485355

53495356
static void mc_print_usage(void)
5350-
{
5357+
{
5358+
const HChar* plo_default = "no";
5359+
# if defined(VGO_darwin)
5360+
plo_default = "yes";
5361+
# endif
5362+
53515363
VG_(printf)(
53525364
" --leak-check=no|summary|full search for memory leaks at exit? [summary]\n"
53535365
" --leak-resolution=low|med|high differentiation of leak stack traces [high]\n"
@@ -5366,7 +5378,7 @@ static void mc_print_usage(void)
53665378
" same as --show-leak-kinds=definite\n"
53675379
" --undef-value-errors=no|yes check for undefined value errors [yes]\n"
53685380
" --track-origins=no|yes show origins of undefined values? [no]\n"
5369-
" --partial-loads-ok=no|yes too hard to explain here; see manual [no]\n"
5381+
" --partial-loads-ok=no|yes too hard to explain here; see manual [%s]\n"
53705382
" --freelist-vol=<number> volume of freed blocks queue [20000000]\n"
53715383
" --freelist-big-blocks=<number> releases first blocks with size>= [1000000]\n"
53725384
" --workaround-gcc296-bugs=no|yes self explanatory [no]\n"
@@ -5375,6 +5387,7 @@ static void mc_print_usage(void)
53755387
" --free-fill=<hexnumber> fill free'd areas with given value\n"
53765388
" --keep-stacktraces=alloc|free|alloc-and-free|alloc-then-free|none\n"
53775389
" stack trace(s) to keep for malloc'd/free'd areas [alloc-then-free]\n"
5390+
, plo_default
53785391
);
53795392
}
53805393

0 commit comments

Comments
 (0)