Re: Valgrind and FontForge: now with less grit in your grind

Frank Trampe <[email protected]>
Newsgroups gmane.comp.fonts.fontforge.devel
Message-ID <CANkSbhqAtOiBX_pgEXzYrpHtGyow5fmE3_4A3y_QoupBtKibyg@mail.gmail.com>
You're now on my list of heroes.



On Sat, Aug 2, 2014 at 2:54 PM, Thomas Shinnick <[email protected]> wrote:

> So I wanted to rebuild Python and then use Python's supplied Valgrind
> suppression file to make the reports much less confusing, but ran into
> problems.  And then thought "but not everyone wants to rebuild Python.
> Maybe I could just rudely crudely remove all the Python 'noise' with new
> suppression files...?"
>
> So I did, and now Valgrind report of FontForge initialization shows 12
> entries instead of 200+ without these suppressions.  Even after doing a lot
> of moving around in a font and a few UI operations the report has only ~100
> entries.  It is now **much easier** to see FontForge's leaks and oddities.
>
> I've built up Valgrind suppressions files for both Python and Pango
> gotchas.  These eliminate much or nearly all of the 'noise' from problems
> running with embedded Python or Pango libraries.
>
> Note however that the Python is for version 3.  I'll be working on one for
> Python 2 shortly.
>
> For lack of another idea, I've dumped the two suppression files into gists:
>     Valgrind suppression file for FontForge built with Python 3
> <https://gist.github.com/tshinnic/2febc414cee2a7f96066>
>     Valgrind suppression file for FontForge built with Pango
> <https://gist.github.com/tshinnic/1aa5d249ceede82abf1a>
>
> I've been running Valgrind with these like so:
>     valgrind --suppressions=valgrind_ff_pango.supp
> --suppressions=valgrind_ff_p3.supp
>           --log-file=valgrind --leak-check=full --track-origins=yes
> fontforge
>
>
> For example of 'noise', one source of 'leaks' by Python is from its
> 'interning'
> strings.  Dozens of Valgrind report entries.  A completely unseen pool
> of memory, I'm not sure they clean this up on termination of stand-alone
> Python, but we certainly don't get it cleaned up when running the
> embedded Python.  Much better to ignore these completely.
>
> I've tested the suppression files on both Ubuntu and Fedora.  I'm
> hoping people will *test on other platforms*.  While I'm taking great
> advantage of the Valgrind wildcarding features to try to
> *make therules more portable*, there are differences that can pop up from
> platform to platform.  One possibility is changed library filenames. :(
>
> A very strange thing (to me anyway) is that Valgrind doesn't see any
> address or value errors running under Fedora, but *does* see those
> running under Ubuntu.  And Ubuntu hits far fewer of other kinds of
> entries.  Very strange...
>
> And of course it is possible I'm also seeing differences between
> Python versions, 3.3 on my Fedora and 3.4 on Ubuntu.
>
> Please test on your favorite platforms and exercising your least favorite
> scenarios.
> If you see Python or Pango entries pop up I'd like to hear the details.
>
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Fontforge-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fontforge-devel
>
>

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds

_______________________________________________
Fontforge-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fontforge-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.