From: Nicholas Nethercote Date: Tue, 25 Sep 2007 22:05:04 +0000 (+0000) Subject: Add an FAQ. X-Git-Tag: svn/VALGRIND_3_3_0~197 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c970063ea04e98579f803d0d3c8055d3f6a4a37b;p=thirdparty%2Fvalgrind.git Add an FAQ. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6910 --- diff --git a/docs/xml/FAQ.xml b/docs/xml/FAQ.xml index 9ff0626e9d..be3e111ef4 100644 --- a/docs/xml/FAQ.xml +++ b/docs/xml/FAQ.xml @@ -368,6 +368,32 @@ Invalid write of size 1 + + + + My program crashes normally, but doesn't under Valgrind, or vice + versa. What's happening? + + + When a program runs under Valgrind, its environment is slightly + different to when it runs natively. For example, the memory layout is + different, and the way that threads are scheduled is different. + + Most of the time this doesn't make any difference, but it can, + particularly if your program is buggy. For example, if your program + crashes because it erroneously accesses memory that is unaddressable, + it's possible that this memory will not be unaddressable when run under + Valgrind. Alternatively, if your program has data races, these may not + manifest under Valgrind. + + There isn't anything you can do to change this, it's just the + nature of the way Valgrind works that it cannot exactly replicate a + native execution environment. In the case where your program crashes + due to a memory error when run natively but not when run under Valgrind, + in most cases Memcheck should identify the bad memory operation.. + + +