hawkinsw wrote:

> Use a Python Bytes and ByteArray object instead of Integers for 
> TestOwnedReferences and TestBorrowedReferences. These two tests were failing 
> when building against Python 3.12 because these Integer objects had a 
> refcount of 4294967296 (-1). I didn't dig into it, but I suspect the Python 
> runtime has adopted an optimization to decrease refcounting traffic for these 
> simple objects.

Perhaps related to ...

https://github.com/python/cpython/pull/30872/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a

I was curious and investigated. Whether that is the *exact* change, it seems to 
confirm your hypothesis that there is special refcounting code for certain 
types of Python objects. Would you agree with that?

I hope that helps!

https://github.com/llvm/llvm-project/pull/82098
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to