]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add an FAQ.
authorNicholas Nethercote <njn@valgrind.org>
Tue, 25 Sep 2007 22:05:04 +0000 (22:05 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Tue, 25 Sep 2007 22:05:04 +0000 (22:05 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6910

docs/xml/FAQ.xml

index 9ff0626e9d5617ca02c50f586425d06305343bc3..be3e111ef4b098fb0e1be1798023ee2e414e1814 100644 (file)
@@ -368,6 +368,32 @@ Invalid write of size 1
   </answer>
 </qandaentry>
 
+
+<qandaentry id="faq.crashes">
+  <question id="q-crashes">
+    <para>My program crashes normally, but doesn't under Valgrind, or vice
+    versa.  What's happening?</para>
+  </question>
+  <answer id="a-crashes">
+    <para>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.</para>
+    
+    <para>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.</para>
+
+    <para>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.</para>.
+  </answer>
+</qandaentry>
+
 </qandadiv>