Swig 2.0.7 segfaults at
#1 0x00000000004f86ee in Swig_scopename_last (s=0x0) at Swig/misc.c:872
872 if (!strstr(c, "::"))
with c being NULL
#2 0x00000000004fc8a8 in Swig_name_str (n=0x7f5816b39930) at Swig/naming.c:1667
1667 String *name = Swig_scopename_last(Getattr(n, "name"));
but gdb cannot resolve n:
(gdb) print n
$2 = (Node *) 0x7f5816b39930
(gdb) print *n
Attempt to dereference a generic pointer.
Hmm, seems to be a gcc 4.7 issue and not related to swig.
This is a swig bug - see duplicate 3530055.
BTW, swig debugging is a whole lot easier if using the gdb macros in Tools/swig.gdb. This this file for details as well as http://swig.svn.sourceforge.net/viewvc/swig/trunk/Doc/Devel/internals.html#7.