I get the attached error report, claiming that "ob_refcnt of '*msg' is 1 too high". But I believe the refcount is correct, especially since adding a DECREF causes intermittent segfaults later in the program's execution (during GC).
I hypothesize CPyChecker misunderstands the ref semantics of either PyErr_NormalizeException or PyErr_Restore.
Fedora 18, GCC 4.7.2, Python 2.7.3, gcc-python-plugin at rev 6d8b81c0.
Analyzing _cbsonmodule.c from this revision:
https://github.com/mongodb/mongo-python-driver/commit/ba66a2dde7b85bf1af5d64c245d5d27102c11f59
I get the attached error report, claiming that "ob_refcnt of '*msg' is 1 too high". But I believe the refcount is correct, especially since adding a DECREF causes intermittent segfaults later in the program's execution (during GC).
I hypothesize CPyChecker misunderstands the ref semantics of either PyErr_NormalizeException or PyErr_Restore.
Fedora 18, GCC 4.7.2, Python 2.7.3, gcc-python-plugin at rev 6d8b81c0.