<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Success Stories — gcc-python-plugin 0.9 documentation</title> <link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '', VERSION: '0.9', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="gcc-python-plugin 0.9 documentation" href="index.html" /> <link rel="next" title="Miscellanea" href="misc.html" /> <link rel="prev" title="Usage example: a static analysis tool for CPython extension code" href="cpychecker.html" /> </head> <body> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="misc.html" title="Miscellanea" accesskey="N">next</a> |</li> <li class="right" > <a href="cpychecker.html" title="Usage example: a static analysis tool for CPython extension code" accesskey="P">previous</a> |</li> <li><a href="index.html">gcc-python-plugin 0.9 documentation</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="success-stories"> <h1>Success Stories<a class="headerlink" href="#success-stories" title="Permalink to this headline">¶</a></h1> <p>If you use the gcc python plugin to improve your code, we’d love to hear about it.</p> <p>If you want to share a success story here, please email the plugin’s <a class="reference external" href="https://fedorahosted.org/mailman/listinfo/gcc-python-plugin/">mailing list</a>.</p> <div class="section" id="the-gnu-debugger"> <h2>The <a class="reference external" href="http://sourceware.org/gdb/">GNU Debugger</a><a class="headerlink" href="#the-gnu-debugger" title="Permalink to this headline">¶</a></h2> <p>Bugs found in gdb by compiling it with the plugin’s <a class="reference internal" href="cpychecker.html#cpychecker"><em>gcc-with-cpychecker</em></a> script:</p> <blockquote> <div><ul class="simple"> <li><a class="reference external" href="http://sourceware.org/bugzilla/show_bug.cgi?id=13308">http://sourceware.org/bugzilla/show_bug.cgi?id=13308</a></li> <li><a class="reference external" href="http://sourceware.org/bugzilla/show_bug.cgi?id=13309">http://sourceware.org/bugzilla/show_bug.cgi?id=13309</a></li> <li><a class="reference external" href="http://sourceware.org/bugzilla/show_bug.cgi?id=13310">http://sourceware.org/bugzilla/show_bug.cgi?id=13310</a></li> <li><a class="reference external" href="http://sourceware.org/bugzilla/show_bug.cgi?id=13316">http://sourceware.org/bugzilla/show_bug.cgi?id=13316</a></li> <li><a class="reference external" href="http://sourceware.org/ml/gdb-patches/2011-06/msg00376.html">http://sourceware.org/ml/gdb-patches/2011-06/msg00376.html</a></li> <li><a class="reference external" href="http://sourceware.org/ml/gdb-patches/2011-10/msg00391.html">http://sourceware.org/ml/gdb-patches/2011-10/msg00391.html</a></li> <li><a class="reference external" href="http://sourceware.org/bugzilla/show_bug.cgi?id=13331">http://sourceware.org/bugzilla/show_bug.cgi?id=13331</a></li> </ul> </div></blockquote> <p>Tom Tromey also wrote specialized Python scripts to use the GCC plugin to locate bugs within GDB.</p> <p>One of his scripts analyzes gdb’s resource-management code, which found some resource leaks and a possible crasher:</p> <blockquote> <div><ul class="simple"> <li><a class="reference external" href="http://sourceware.org/ml/gdb-patches/2011-06/msg00408.html">http://sourceware.org/ml/gdb-patches/2011-06/msg00408.html</a></li> </ul> </div></blockquote> <p>The other generates a whole-program call-graph, annotated with information on gdb’s own exception-handling mechanism. A script then finds places where these exceptions were not properly integrated with gdb’s embedded Python support:</p> <blockquote> <div><ul class="simple"> <li><a class="reference external" href="http://sourceware.org/ml/gdb/2011-11/msg00002.html">http://sourceware.org/ml/gdb/2011-11/msg00002.html</a></li> <li><a class="reference external" href="http://sourceware.org/bugzilla/show_bug.cgi?id=13369">http://sourceware.org/bugzilla/show_bug.cgi?id=13369</a></li> </ul> </div></blockquote> </div> <div class="section" id="id1"> <h2><a class="reference external" href="http://www.libreoffice.org/">LibreOffice</a><a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2> <p>Stephan Bergmann wrote a script to analyze LibreOffice’s source code, detecting a particular usage pattern of C++ method calls:</p> <blockquote> <div><ul class="simple"> <li><a class="reference external" href="https://fedorahosted.org/pipermail/gcc-python-plugin/2011-December/000136.html">https://fedorahosted.org/pipermail/gcc-python-plugin/2011-December/000136.html</a></li> <li><a class="reference external" href="https://bugs.freedesktop.org/show_bug.cgi?id=43460">https://bugs.freedesktop.org/show_bug.cgi?id=43460</a></li> </ul> </div></blockquote> </div> <div class="section" id="pycups"> <h2>pycups<a class="headerlink" href="#pycups" title="Permalink to this headline">¶</a></h2> <p>Bugs found in the <a class="reference external" href="http://cyberelk.net/tim/software/pycups/">Python bindings for the CUPS API</a> by compiling it with the plugin’s <a class="reference internal" href="cpychecker.html#cpychecker"><em>gcc-with-cpychecker</em></a> script:</p> <blockquote> <div><ul class="simple"> <li><a class="reference external" href="https://fedorahosted.org/pycups/ticket/17">https://fedorahosted.org/pycups/ticket/17</a></li> </ul> </div></blockquote> </div> <div class="section" id="python-krbv"> <h2>python-krbV<a class="headerlink" href="#python-krbv" title="Permalink to this headline">¶</a></h2> <p>Bug found in the <a class="reference external" href="https://fedorahosted.org/python-krbV/">Python bindings for the Kerberos 5 API</a> by compiling it with the plugin’s <a class="reference internal" href="cpychecker.html#cpychecker"><em>gcc-with-cpychecker</em></a> script:</p> <blockquote> <div><ul class="simple"> <li><a class="reference external" href="https://fedorahosted.org/python-krbV/ticket/1">https://fedorahosted.org/python-krbV/ticket/1</a></li> </ul> </div></blockquote> </div> <div class="section" id="bugs-found-in-itself"> <h2>Bugs found in itself<a class="headerlink" href="#bugs-found-in-itself" title="Permalink to this headline">¶</a></h2> <p>Bugs found and fixed in the gcc Python plugin itself, by running the the plugin’s <a class="reference internal" href="cpychecker.html#cpychecker"><em>gcc-with-cpychecker</em></a> script when compiling another copy:</p> <blockquote> <div><ul class="simple"> <li>various reference counting errors:<ul> <li><a class="reference external" href="http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=a9f48fac24a66c77007d99bf23f2eab188eb909e">http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=a9f48fac24a66c77007d99bf23f2eab188eb909e</a></li> <li><a class="reference external" href="http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=2922ad81c8e0ea954d462433ecc83d86d9ebab68">http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=2922ad81c8e0ea954d462433ecc83d86d9ebab68</a></li> </ul> </li> <li>bad format string: <a class="reference external" href="https://fedorahosted.org/pipermail/gcc-python-plugin/2011-August/000065.html">https://fedorahosted.org/pipermail/gcc-python-plugin/2011-August/000065.html</a></li> <li>minor const-correctness error: <a class="reference external" href="http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=4fe4a83288e04be35a96d0bfec332197fb32c358">http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=4fe4a83288e04be35a96d0bfec332197fb32c358</a></li> </ul> </div></blockquote> </div> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Success Stories</a><ul> <li><a class="reference internal" href="#the-gnu-debugger">The GNU Debugger</a></li> <li><a class="reference internal" href="#id1">LibreOffice</a></li> <li><a class="reference internal" href="#pycups">pycups</a></li> <li><a class="reference internal" href="#python-krbv">python-krbV</a></li> <li><a class="reference internal" href="#bugs-found-in-itself">Bugs found in itself</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="cpychecker.html" title="previous chapter">Usage example: a static analysis tool for CPython extension code</a></p> <h4>Next topic</h4> <p class="topless"><a href="misc.html" title="next chapter">Miscellanea</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/success.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="misc.html" title="Miscellanea" >next</a> |</li> <li class="right" > <a href="cpychecker.html" title="Usage example: a static analysis tool for CPython extension code" >previous</a> |</li> <li><a href="index.html">gcc-python-plugin 0.9 documentation</a> »</li> </ul> </div> <div class="footer"> © Copyright 2011, David Malcolm. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>