<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.opendap.org/index.php?action=history&amp;feed=atom&amp;title=Valgrind</id>
	<title>Valgrind - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://docs.opendap.org/index.php?action=history&amp;feed=atom&amp;title=Valgrind"/>
	<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Valgrind&amp;action=history"/>
	<updated>2026-06-12T13:32:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Valgrind&amp;diff=9632&amp;oldid=prev</id>
		<title>Ndp: /* Changes to Makefile.am */</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Valgrind&amp;diff=9632&amp;oldid=prev"/>
		<updated>2013-04-29T23:20:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Changes to Makefile.am&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:20, 29 April 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l15&quot;&gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Changes to Makefile.am ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Changes to Makefile.am ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Add a conditional line to the unit tests Makefile.am that will set the Makefile variable &amp;#039;&amp;#039;TEST_ENVIRONMENT&amp;#039;&amp;#039; to the following: &amp;#039;&amp;#039;valgrind --quiet --trace-children=yes --error-exitcode=1 --dsymutil=yes --leak-check=yes &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--log-file=&amp;quot;valgrind-%p.log&lt;/del&gt;&amp;quot;&amp;#039;&amp;#039;. Here&amp;#039;s what the options do:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Add a conditional line to the unit tests Makefile.am that will set the Makefile variable &amp;#039;&amp;#039;TEST_ENVIRONMENT&amp;#039;&amp;#039; to the following: &amp;#039;&amp;#039;valgrind --quiet --trace-children=yes --error-exitcode=1 --dsymutil=yes --leak-check=yes&amp;quot;&amp;#039;&amp;#039;. Here&amp;#039;s what the options do:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;quiet: suppress the usual (non-error) output of valgrind&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;quiet: suppress the usual (non-error) output of valgrind&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;trace-children: when a test starts a subprocess, it&amp;#039;s trace too (not the default). This is important when starting programs made using libtool since they are scripts by default that fork/exec to start the &amp;#039;real&amp;#039; program.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;trace-children: when a test starts a subprocess, it&amp;#039;s trace too (not the default). This is important when starting programs made using libtool since they are scripts by default that fork/exec to start the &amp;#039;real&amp;#039; program.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l21&quot;&gt;Line 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;dsymutil: useful for OS/X, but can increase runtime; does nothing on Linux&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;dsymutil: useful for OS/X, but can increase runtime; does nothing on Linux&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;leak-check: Using &amp;#039;&amp;#039;yes&amp;#039;&amp;#039; gets leak details (the default is &amp;#039;&amp;#039;summary&amp;#039;&amp;#039;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;leak-check: Using &amp;#039;&amp;#039;yes&amp;#039;&amp;#039; gets leak details (the default is &amp;#039;&amp;#039;summary&amp;#039;&amp;#039;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;log-file: Write any output detail errors to a file with the PID. I stopped using this with tests that are run from a Makefile since it writes files even when there&#039;s no output (i.e., using --quiet and there are no errors) and that is confusing.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To add this in a Makefile.am use:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To add this in a Makefile.am use:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l27&quot;&gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if USE_VALGRIND&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if USE_VALGRIND&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;TESTS_ENVIRONMENT=valgrind --quiet --trace-children=yes --error-exitcode=1 \&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;TESTS_ENVIRONMENT=valgrind --quiet --trace-children=yes --error-exitcode=1 \&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--dsymutil=yes --leak-check=yes &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--log-file=&amp;quot;valgrind-%p.log&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--dsymutil=yes --leak-check=yes  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;endif&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;endif&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Other &amp;#039;&amp;#039;valgrind&amp;#039;&amp;#039; options that might be useful:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Other &amp;#039;&amp;#039;valgrind&amp;#039;&amp;#039; options that might be useful:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;log-file: Write any output detail errors to a file with the PID. I stopped using this with tests that are run from a Makefile since it writes files even when there&#039;s no output (i.e., using --quiet and there are no errors) and that is confusing.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;show-reachable: this will show all memory in use when the process exits&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;show-reachable: this will show all memory in use when the process exits&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;track-origins: the &amp;#039;&amp;#039;memcheck&amp;#039;&amp;#039; tool in &amp;#039;&amp;#039;valgrind&amp;#039;&amp;#039; shows returns errors for uninitialized use, but not where the uninitialized memory/variable was defined. setting this to &amp;#039;&amp;#039;yes&amp;#039;&amp;#039; wil get that information, but at the cost of about doubling the runtime of the test/program.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;track-origins: the &amp;#039;&amp;#039;memcheck&amp;#039;&amp;#039; tool in &amp;#039;&amp;#039;valgrind&amp;#039;&amp;#039; shows returns errors for uninitialized use, but not where the uninitialized memory/variable was defined. setting this to &amp;#039;&amp;#039;yes&amp;#039;&amp;#039; wil get that information, but at the cost of about doubling the runtime of the test/program.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ndp</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Valgrind&amp;diff=9631&amp;oldid=prev</id>
		<title>Ndp: /* Changes to configure.ac */</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Valgrind&amp;diff=9631&amp;oldid=prev"/>
		<updated>2013-04-29T23:14:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Changes to configure.ac&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:14, 29 April 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l10&quot;&gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First, modify configure.ac so that it takes an option to turn this feature on. The &amp;#039;&amp;#039;m4&amp;#039;&amp;#039; file gcov_valgrind.m4 from libdap defines a very simple macro that will do this so only one line needs to be added to configure.ac. Copy and add the macro and add the line:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First, modify configure.ac so that it takes an option to turn this feature on. The &amp;#039;&amp;#039;m4&amp;#039;&amp;#039; file gcov_valgrind.m4 from libdap defines a very simple macro that will do this so only one line needs to be added to configure.ac. Copy and add the macro and add the line:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  DODS_GCOV_VALGRIND&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  DODS_GCOV_VALGRIND&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;to configure.ac. This macro adds the --enable-valgrind and the --enable-gcov (see below) options and defines an automake variable that can be used in a Makefile.am file.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;to configure.ac. This macro adds the --enable-valgrind and the --enable-gcov (see below) options &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;to the configure script &lt;/ins&gt;and defines an automake variable that can be used in a Makefile.am file.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note that gcov is the GNU compile coverage analysis tool. To use it, you must configure using &amp;#039;&amp;#039;./configure --enable-coverage&amp;#039;&amp;#039; (assuming you use the macro described above). Once configured for coverage analysis, run the tests and coverage data will be written to disk which can be analyzed using the &amp;#039;&amp;#039;gcov&amp;#039;&amp;#039; and &amp;#039;&amp;#039;gprof&amp;#039;&amp;#039; tools. The &amp;#039;&amp;#039;gcov&amp;#039;&amp;#039; program provides coverage data while the &amp;#039;&amp;#039;gprof&amp;#039;&amp;#039; tool provides profiling information.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note that gcov is the GNU compile coverage analysis tool. To use it, you must configure using &amp;#039;&amp;#039;./configure --enable-coverage&amp;#039;&amp;#039; (assuming you use the macro described above). Once configured for coverage analysis, run the tests and coverage data will be written to disk which can be analyzed using the &amp;#039;&amp;#039;gcov&amp;#039;&amp;#039; and &amp;#039;&amp;#039;gprof&amp;#039;&amp;#039; tools. The &amp;#039;&amp;#039;gcov&amp;#039;&amp;#039; program provides coverage data while the &amp;#039;&amp;#039;gprof&amp;#039;&amp;#039; tool provides profiling information.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ndp</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Valgrind&amp;diff=9630&amp;oldid=prev</id>
		<title>Ndp: /* Changes to configure.ac */</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Valgrind&amp;diff=9630&amp;oldid=prev"/>
		<updated>2013-04-29T23:12:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Changes to configure.ac&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:12, 29 April 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l10&quot;&gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First, modify configure.ac so that it takes an option to turn this feature on. The &amp;#039;&amp;#039;m4&amp;#039;&amp;#039; file gcov_valgrind.m4 from libdap defines a very simple macro that will do this so only one line needs to be added to configure.ac. Copy and add the macro and add the line:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First, modify configure.ac so that it takes an option to turn this feature on. The &amp;#039;&amp;#039;m4&amp;#039;&amp;#039; file gcov_valgrind.m4 from libdap defines a very simple macro that will do this so only one line needs to be added to configure.ac. Copy and add the macro and add the line:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  DODS_GCOV_VALGRIND&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  DODS_GCOV_VALGRIND&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;to configure.ac. This macro &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;add &lt;/del&gt;the --enable-valgrind &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(&lt;/del&gt;and --enable-gcov&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;; &lt;/del&gt;see below) options and defines an automake variable that can be used in a Makefile.am file.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;to configure.ac. This macro &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;adds &lt;/ins&gt;the --enable-valgrind and &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/ins&gt;--enable-gcov &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(&lt;/ins&gt;see below) options and defines an automake variable that can be used in a Makefile.am file.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note that gcov is the GNU compile coverage analysis tool. To use it, you must configure using &amp;#039;&amp;#039;./configure --enable-coverage&amp;#039;&amp;#039; (assuming you use the macro described above). Once configured for coverage analysis, run the tests and coverage data will be written to disk which can be analyzed using the &amp;#039;&amp;#039;gcov&amp;#039;&amp;#039; and &amp;#039;&amp;#039;gprof&amp;#039;&amp;#039; tools. The &amp;#039;&amp;#039;gcov&amp;#039;&amp;#039; program provides coverage data while the &amp;#039;&amp;#039;gprof&amp;#039;&amp;#039; tool provides profiling information.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note that gcov is the GNU compile coverage analysis tool. To use it, you must configure using &amp;#039;&amp;#039;./configure --enable-coverage&amp;#039;&amp;#039; (assuming you use the macro described above). Once configured for coverage analysis, run the tests and coverage data will be written to disk which can be analyzed using the &amp;#039;&amp;#039;gcov&amp;#039;&amp;#039; and &amp;#039;&amp;#039;gprof&amp;#039;&amp;#039; tools. The &amp;#039;&amp;#039;gcov&amp;#039;&amp;#039; program provides coverage data while the &amp;#039;&amp;#039;gprof&amp;#039;&amp;#039; tool provides profiling information.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ndp</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Valgrind&amp;diff=9607&amp;oldid=prev</id>
		<title>Jimg: /* Changes to Makefile.am */</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Valgrind&amp;diff=9607&amp;oldid=prev"/>
		<updated>2013-04-25T15:21:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Changes to Makefile.am&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:21, 25 April 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot;&gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;trace-children: when a test starts a subprocess, it&amp;#039;s trace too (not the default). This is important when starting programs made using libtool since they are scripts by default that fork/exec to start the &amp;#039;real&amp;#039; program.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;trace-children: when a test starts a subprocess, it&amp;#039;s trace too (not the default). This is important when starting programs made using libtool since they are scripts by default that fork/exec to start the &amp;#039;real&amp;#039; program.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;error-exitcode: valgrind does not usually return a non-zero code when it finds a leak, etc., but instead returns the program&amp;#039;s exit code. Setting this to &amp;#039;&amp;#039;1&amp;#039;&amp;#039; means that leaks will show up as errors when the tests are run by &amp;#039;&amp;#039;make&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;error-exitcode: valgrind does not usually return a non-zero code when it finds a leak, etc., but instead returns the program&amp;#039;s exit code. Setting this to &amp;#039;&amp;#039;1&amp;#039;&amp;#039; means that leaks will show up as errors when the tests are run by &amp;#039;&amp;#039;make&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;dsymutil: &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;needed &lt;/del&gt;for OS/X; does nothing on Linux&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;dsymutil: &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;useful &lt;/ins&gt;for OS/X&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, but can increase runtime&lt;/ins&gt;; does nothing on Linux&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;leak-check: Using &amp;#039;&amp;#039;yes&amp;#039;&amp;#039; gets leak details (the default is &amp;#039;&amp;#039;summary&amp;#039;&amp;#039;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;leak-check: Using &amp;#039;&amp;#039;yes&amp;#039;&amp;#039; gets leak details (the default is &amp;#039;&amp;#039;summary&amp;#039;&amp;#039;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;log-file: Write any output detail errors to a file with the PID.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;log-file: Write any output detail errors to a file with the PID&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. I stopped using this with tests that are run from a Makefile since it writes files even when there&amp;#039;s no output (i.e., using --quiet and there are no errors) and that is confusing&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To add this in a Makefile.am use:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To add this in a Makefile.am use:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jimg</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Valgrind&amp;diff=9598&amp;oldid=prev</id>
		<title>Jimg: Created page with &quot;== Why == Why use &#039;&#039;valgrind&#039;&#039; with unit tests? Aside from why not, because it can catch errors like memory corruption, uninitialized value use and leaks.   This addition drops i...&quot;</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Valgrind&amp;diff=9598&amp;oldid=prev"/>
		<updated>2013-04-22T22:57:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Why == Why use &amp;#039;&amp;#039;valgrind&amp;#039;&amp;#039; with unit tests? Aside from why not, because it can catch errors like memory corruption, uninitialized value use and leaks.   This addition drops i...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Why ==&lt;br /&gt;
Why use &amp;#039;&amp;#039;valgrind&amp;#039;&amp;#039; with unit tests? Aside from why not, because it can catch errors like memory corruption, uninitialized value use and leaks. &lt;br /&gt;
&lt;br /&gt;
This addition drops into autotools very easily and works well with CppUnit.&lt;br /&gt;
&lt;br /&gt;
== How ==&lt;br /&gt;
Modify &amp;#039;&amp;#039;configure.ac&amp;#039;&amp;#039; and &amp;#039;&amp;#039;Makefile.am&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Changes to configure.ac ===&lt;br /&gt;
First, modify configure.ac so that it takes an option to turn this feature on. The &amp;#039;&amp;#039;m4&amp;#039;&amp;#039; file gcov_valgrind.m4 from libdap defines a very simple macro that will do this so only one line needs to be added to configure.ac. Copy and add the macro and add the line:&lt;br /&gt;
 DODS_GCOV_VALGRIND&lt;br /&gt;
to configure.ac. This macro add the --enable-valgrind (and --enable-gcov; see below) options and defines an automake variable that can be used in a Makefile.am file.&lt;br /&gt;
&lt;br /&gt;
Note that gcov is the GNU compile coverage analysis tool. To use it, you must configure using &amp;#039;&amp;#039;./configure --enable-coverage&amp;#039;&amp;#039; (assuming you use the macro described above). Once configured for coverage analysis, run the tests and coverage data will be written to disk which can be analyzed using the &amp;#039;&amp;#039;gcov&amp;#039;&amp;#039; and &amp;#039;&amp;#039;gprof&amp;#039;&amp;#039; tools. The &amp;#039;&amp;#039;gcov&amp;#039;&amp;#039; program provides coverage data while the &amp;#039;&amp;#039;gprof&amp;#039;&amp;#039; tool provides profiling information.&lt;br /&gt;
&lt;br /&gt;
=== Changes to Makefile.am ===&lt;br /&gt;
Add a conditional line to the unit tests Makefile.am that will set the Makefile variable &amp;#039;&amp;#039;TEST_ENVIRONMENT&amp;#039;&amp;#039; to the following: &amp;#039;&amp;#039;valgrind --quiet --trace-children=yes --error-exitcode=1 --dsymutil=yes --leak-check=yes --log-file=&amp;quot;valgrind-%p.log&amp;quot;&amp;#039;&amp;#039;. Here&amp;#039;s what the options do:&lt;br /&gt;
;quiet: suppress the usual (non-error) output of valgrind&lt;br /&gt;
;trace-children: when a test starts a subprocess, it&amp;#039;s trace too (not the default). This is important when starting programs made using libtool since they are scripts by default that fork/exec to start the &amp;#039;real&amp;#039; program.&lt;br /&gt;
;error-exitcode: valgrind does not usually return a non-zero code when it finds a leak, etc., but instead returns the program&amp;#039;s exit code. Setting this to &amp;#039;&amp;#039;1&amp;#039;&amp;#039; means that leaks will show up as errors when the tests are run by &amp;#039;&amp;#039;make&amp;#039;&amp;#039;.&lt;br /&gt;
;dsymutil: needed for OS/X; does nothing on Linux&lt;br /&gt;
;leak-check: Using &amp;#039;&amp;#039;yes&amp;#039;&amp;#039; gets leak details (the default is &amp;#039;&amp;#039;summary&amp;#039;&amp;#039;)&lt;br /&gt;
;log-file: Write any output detail errors to a file with the PID.&lt;br /&gt;
&lt;br /&gt;
To add this in a Makefile.am use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;make&amp;quot;&amp;gt;&lt;br /&gt;
if USE_VALGRIND&lt;br /&gt;
TESTS_ENVIRONMENT=valgrind --quiet --trace-children=yes --error-exitcode=1 \&lt;br /&gt;
--dsymutil=yes --leak-check=yes --log-file=&amp;quot;valgrind-%p.log&amp;quot;&lt;br /&gt;
endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other &amp;#039;&amp;#039;valgrind&amp;#039;&amp;#039; options that might be useful:&lt;br /&gt;
;show-reachable: this will show all memory in use when the process exits&lt;br /&gt;
;track-origins: the &amp;#039;&amp;#039;memcheck&amp;#039;&amp;#039; tool in &amp;#039;&amp;#039;valgrind&amp;#039;&amp;#039; shows returns errors for uninitialized use, but not where the uninitialized memory/variable was defined. setting this to &amp;#039;&amp;#039;yes&amp;#039;&amp;#039; wil get that information, but at the cost of about doubling the runtime of the test/program.&lt;/div&gt;</summary>
		<author><name>Jimg</name></author>
	</entry>
</feed>