mozilla

Revision 17926 of Debugging Mozilla with Valgrind

  • Revision slug: Debugging_Mozilla_with_Valgrind
  • Revision title: Debugging Mozilla with Valgrind
  • Revision id: 17926
  • Created:
  • Creator: Jesse
  • Is current revision? No
  • Comment 11 words added

Revision Content

Where can I get Valgrind?

Linux: http://valgrind.org/ or your distro

Mac: experimental; get it from SVN.

Mozilla crashes at startup when I run it under Valgrind. What can I do?

GTK 2 builds of Mozilla bring in ORBit, which is sensitive to the memory alignment used by malloc(). The system implementation aligns to 8 bytes, while Valgrind aligns to 4 bytes by default. This causes ORBit to crash. To run Mozilla under Valgrind, it is recommended that you use the --alignment=8 option to Valgrind.

Is there a shared memcheck suppression file for known bugs?

Jesse has one somewhere...

What do I do if the JIT crashes on startup?

Pass the parameter --smc-check=all to valgrind for now.

Note: this option makes valgrind run much slower. An alternative solution is to turn both the content and chrome JITs off.

Or build Mozilla with --enable-valgrind (experimental).

Revision Source

<h3 name="Mozilla_crashes_at_startup_when_I_run_it_under_Valgrind._What_can_I_do.3F">Where can I get Valgrind?</h3>
<p>Linux: <a class=" external" href="http://valgrind.org/" rel="freelink">http://valgrind.org/</a> or your distro</p>
<p>Mac: experimental; <a class="external" href="http://valgrind.org/downloads/repository.html" title="http://valgrind.org/downloads/repository.html"><span class="external">get it from SVN</span></a>.</p>
<h3 name="Mozilla_crashes_at_startup_when_I_run_it_under_Valgrind._What_can_I_do.3F">Mozilla crashes at startup when I run it under Valgrind. What can I do?</h3>
<p>GTK 2 builds of Mozilla bring in ORBit, which is sensitive to the memory alignment used by malloc(). The system implementation aligns to 8 bytes, while Valgrind aligns to 4 bytes by default. This causes ORBit to crash. To run Mozilla under Valgrind, it is recommended that you use the <code>--alignment=8</code> option to Valgrind.</p>
<h3>Is there a shared memcheck suppression file for known bugs?</h3>
<p>Jesse has one somewhere...</p>
<h3>What do I do if the JIT crashes on startup?</h3>
<p>Pass the parameter <code>--smc-check=all</code> to valgrind for now.</p>
<p><em>Note:</em> this option makes valgrind run much slower. An alternative solution is to turn both the content and chrome JITs off.</p>
<p>Or build Mozilla with <code>--enable-valgrind</code> (experimental).</p>
Revert to this revision