From 2aa34e2afea631bde5ea86de85242894510f8d67 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Thu, 20 Oct 2005 01:37:15 +0000 Subject: [PATCH] Remove all remaining references to pointercheck. It's sad to see it go, but realistically we can't implement it portably, at least without considerable performance overhead and some additional complexity. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4956 --- coregrind/m_main.c | 11 ----------- coregrind/m_options.c | 1 - coregrind/m_signals.c | 8 ++------ coregrind/pub_core_options.h | 3 --- docs/valgrind.1 | 8 -------- docs/xml/manual-core.xml | 13 ------------- none/tests/cmdline1.stdout.exp | 1 - none/tests/cmdline2.stdout.exp | 1 - 8 files changed, 2 insertions(+), 44 deletions(-) diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 251e577c2..145122103 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -885,7 +885,6 @@ static void usage_NORETURN ( Bool debug_help ) " --run-libc-freeres=no|yes free up glibc memory at exit? [yes]\n" " --simulation-hints=hint1,hint2,... known hints:\n" " lax-ioctls, enable-outer [none]\n" -" --pointercheck=no|yes enforce client address space limits [yes]\n" " --show-emwarns=no|yes show warnings about emulation limits? [no]\n" " --smc-check=none|stack|all checks for self-modifying code: none,\n" " only for code found in stacks, or all [stack]\n" @@ -1091,7 +1090,6 @@ static Bool process_cmd_line_options( UInt* client_auxv, const char* toolname ) else VG_BOOL_CLO(arg, "--db-attach", VG_(clo_db_attach)) else VG_BOOL_CLO(arg, "--demangle", VG_(clo_demangle)) else VG_BOOL_CLO(arg, "--error-limit", VG_(clo_error_limit)) - else VG_BOOL_CLO(arg, "--pointercheck", VG_(clo_pointercheck)) else VG_BOOL_CLO(arg, "--show-emwarns", VG_(clo_show_emwarns)) else VG_NUM_CLO (arg, "--max-stackframe", VG_(clo_max_stackframe)) else VG_BOOL_CLO(arg, "--profile", VG_(clo_profile)) @@ -2478,15 +2476,6 @@ Int main(Int argc, HChar **argv, HChar **envp) VG_(load_suppressions)(); } - //-------------------------------------------------------------- - // Setup pointercheck - // p: layout_remaining_space() [for VG_(client_{base,end})] - // p: process_cmd_line_options() [for VG_(clo_pointercheck)] - //-------------------------------------------------------------- - //if (VG_(clo_pointercheck)) - // VG_(clo_pointercheck) = - // VG_(setup_pointercheck)( VG_(client_base), VG_(client_end)); - //-------------------------------------------------------------- // register client stack //-------------------------------------------------------------- diff --git a/coregrind/m_options.c b/coregrind/m_options.c index a60f074b6..94d78fab3 100644 --- a/coregrind/m_options.c +++ b/coregrind/m_options.c @@ -71,7 +71,6 @@ Char* VG_(clo_simulation_hints) = NULL; Bool VG_(clo_run_libc_freeres) = True; Bool VG_(clo_track_fds) = False; Bool VG_(clo_show_below_main)= False; -Bool VG_(clo_pointercheck) = True; Bool VG_(clo_model_pthreads) = False; Bool VG_(clo_show_emwarns) = False; Int VG_(clo_max_stackframe) = 2000000; diff --git a/coregrind/m_signals.c b/coregrind/m_signals.c index 8f31772b8..a2ada3cd1 100644 --- a/coregrind/m_signals.c +++ b/coregrind/m_signals.c @@ -999,12 +999,8 @@ static void default_action(const vki_siginfo_t *info, ThreadId tid) /* General Protection Fault: The CPU/kernel isn't telling us anything useful, but this is commonly the result of exceeding a - segment limit, such as the one imposed by - --pointercheck=yes. */ - if (VG_(clo_pointercheck)) - event = "GPF (Pointer out of bounds?)"; - else - event = "General Protection Fault"; + segment limit. */ + event = "General Protection Fault"; haveaddr = False; break; } diff --git a/coregrind/pub_core_options.h b/coregrind/pub_core_options.h index 2bac35997..c51f8567d 100644 --- a/coregrind/pub_core_options.h +++ b/coregrind/pub_core_options.h @@ -135,9 +135,6 @@ extern Bool VG_(clo_track_fds); extern Bool VG_(clo_run_libc_freeres); /* Continue stack traces below main()? Default: NO */ extern Bool VG_(clo_show_below_main); -/* Test each client pointer dereference to check it's within the - client address space bounds */ -extern Bool VG_(clo_pointercheck); /* Model the pthread library */ extern Bool VG_(clo_model_pthreads); diff --git a/docs/valgrind.1 b/docs/valgrind.1 index 2da614434..25ef8b766 100644 --- a/docs/valgrind.1 +++ b/docs/valgrind.1 @@ -484,14 +484,6 @@ this is impossible for whatever reason the alignment can be increased using this parameter. The supplied value must be between 8 and 4096 inclusive, and must be a power of two. -.TP -.B ---pointercheck= [default: yes] -When enabled, enforces client address space limits. If this option is -disabled, the client program has full and unfettered access to the part -of the address space used internally by \fBvalgrind\fP. This can cause -unexplained crashes and false error reports, so it is best left enabled. - .TP .B --run-libc-freeres= [default: yes] diff --git a/docs/xml/manual-core.xml b/docs/xml/manual-core.xml index fa55e9273..520007041 100644 --- a/docs/xml/manual-core.xml +++ b/docs/xml/manual-core.xml @@ -1034,19 +1034,6 @@ Addrcheck), the following options apply. - - --pointercheck=yes [default] - --pointercheck=no - This option make Valgrind generate a check on every memory - reference to make sure it is within the client's part of the - address space. This prevents stray writes from damaging - Valgrind itself. On x86, this uses the CPU's segmentation - machinery, and has almost no performance cost; there's almost - never a reason to turn it off. On the other architectures this - option is currently ignored as they don't have a cheap way of achieving - the same functionality. - - --show-emwarns=no [default] --show-emwarns=yes diff --git a/none/tests/cmdline1.stdout.exp b/none/tests/cmdline1.stdout.exp index 9cdf32037..b2d446568 100644 --- a/none/tests/cmdline1.stdout.exp +++ b/none/tests/cmdline1.stdout.exp @@ -20,7 +20,6 @@ usage: valgrind --tool= [options] prog-and-args --run-libc-freeres=no|yes free up glibc memory at exit? [yes] --simulation-hints=hint1,hint2,... known hints: lax-ioctls, enable-outer [none] - --pointercheck=no|yes enforce client address space limits [yes] --show-emwarns=no|yes show warnings about emulation limits? [no] --smc-check=none|stack|all checks for self-modifying code: none, only for code found in stacks, or all [stack] diff --git a/none/tests/cmdline2.stdout.exp b/none/tests/cmdline2.stdout.exp index f1d800b2a..5568f7dc6 100644 --- a/none/tests/cmdline2.stdout.exp +++ b/none/tests/cmdline2.stdout.exp @@ -20,7 +20,6 @@ usage: valgrind --tool= [options] prog-and-args --run-libc-freeres=no|yes free up glibc memory at exit? [yes] --simulation-hints=hint1,hint2,... known hints: lax-ioctls, enable-outer [none] - --pointercheck=no|yes enforce client address space limits [yes] --show-emwarns=no|yes show warnings about emulation limits? [no] --smc-check=none|stack|all checks for self-modifying code: none, only for code found in stacks, or all [stack]