Hi,

I've come across the following bug in SWIG 2.0.10: given the following files

===== test.i
%module test;

%inline {
  typedef struct tagMyStruct {
    int a;
    double b;
  } MyStruct;
}
=====

===== subclass.py
import test
cls = test.MyStruct

class subcls(cls):
    pass

while 1:
    row = subcls()
=====

the following command runs forever, as expected:

swig -python -o test.c test.i && gcc -g -c -fPIC `python-config --includes` -o test.o test.c && gcc -g -shared test.o -o _test.so && python subclass.py

However, if I add -builtin to the SWIG arguments, Python aborts when running subclass.py with a memory error, specifically:

*** glibc detected *** python: double free or corruption (out): 0x00007f6a3cb4d010 ***

However, this *does* work with SWIG 2.0.11, i.e. Python does not crash. Was this a known bug that was fixed, or a fortuitous coincidence???

Cheers,
Karl