Well, I have never been able to isolate it, and the project where it is triggered is rather close-sourced.
long story short - make up a SWIG object inside a function, pass it as a pointer to the swig-wrapped function, then call gc.collect(). After that swig calls object's destructor and if the C code is using it, youre screwd. I am not sure if the bug persists on a small scale, however, it only shows during long simulation runs where thousands of objects like that are circulated. If it ever happens on a smaller case I'll let you know. Alex maanantai 23 huhtikuu 2012 10:52:04 Amaury Forgeot d'Arc kirjoitti: 2012/4/23 Alexander Pyattaev <[email protected]> Right now the main problem with SWIG is the object ownership, i.e. with pypy one has to set thisown=False for all objects to avoid crashes related to GC code. The problem occurs only for long-living objects though. Do you have a sample code for this issue? -- Amaury Forgeot d'Arc
_______________________________________________ pypy-dev mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-dev
