-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Big overhaul part 1 - replace PyRc with manual RefCount + WeakRefList #3386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'll get to this tonight if someone else doesn't beat me to the punch, but |
bfe7aff
to
37e1394
Compare
@fanninpm ooh yea, I noticed that myself, that's really old lol. |
7cf10e3
to
69f5c80
Compare
At this point, running Miri without |
Well, that's probably to be expected, since we don't implement cycle collection and especially type_type and object_type are codependent on each other |
d41f3e0
to
e498933
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to review drop part again, but looks great in general.
05b3a28
to
ed289f7
Compare
...ok what |
what is that error |
did an exception cross an ffi boundary in rustc?? |
Ok phew, just rerunning ci seemed to have fixed it. |
The outer struct is only 1 word now, and inside the box it's a byte for the mutex (which gets padded to a word) + a word for the linked list (we don't use the tail) + a word for the pointer to the object.
This makes debuggers (or rust-gdb, at least) more pleasant to use, since you don't have to manually cast `PyRef<T>.obj.ptr as `*const PyObjectView<T>` Also get rid of PyGenericObject, since it's vestigial
This resolves #2382, resolves #2381 (afaict), and at the very least it will make it much easier to fix any UB now that we control the internals of all the data structures we use.