I did as you suggested. I also discovered that _Py_NewReference is usually a macro, and I'd only fixed the version in Objects/object.c (the one not being used). When I fixed both those things, and switched the makefile so it uses a different Python interpreter in the build itself, it builds successfully. The interpreter doesn't run though.
The next problem: there are a couple of spots where code asserts the refcount of an object must == 1. This is so they can modify the object in-place. This is usually a sanity-check, so I assume the code knows what it's doing, so I removed the refcount assertion. I did this two or three times: set, unicode, and (maybe) bytes.
Now it's segfaulting in lookdict_unicode_nodummy(). mp->ma_keys looks like garbage, the keys it refers to are invalid addresses. I'd be very happy to post my patch if someone else wanted to try debugging it. |