-
Notifications
You must be signed in to change notification settings - Fork 578
Fix memory leaks in feature class
#20809
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
2144e42
to
19abe56
Compare
I've pushed a smoke-me branch of this as well |
One test failure being observed on Linux when using
In my regular invocation of |
I have to admit im baffled by this. Three of those tests are regex engine related, and seem to pass in the output you posted. Can you explain more? Should that even be in this ticket? |
Based on what we have observed in #20810, when I ran the full |
* Free the attrlist OP fragment when applying class or field attribute * Free the OP_PADxV ops we only use to get the pad index out for fieldvar declarations * Add a refcount to the `struct padname_fieldinfo` to keep track of its capture in inner closures so it can be freed at the right time * Free the class-related fields out of HvAUX * Free the actual ObjectFIELDS() array when destroying an object instance * Dup fieldinfo->paramname at sv_dup() time / free it at free time
Do you think you could redo that from before when @leonerd merged the class stuff?Which I guess would be 5d4d8b9 If those test files fail at that commit ID under the build mode we are discussing here i think you should file a ticket for them specifically so I can look into it at some point. |
So, there's still one more memory leak left, but that's only apparent if a compiletime error causes a Compare:
neither of which leak, with
which does. At that point I'm going to say yes, this is a valid bug. But I don't think it's as urgent to fix before 5.37.9's release - especially as I am going on vacation tomorrow. I would verymuch like to get this PR here merged first, because this PR fixes such bugs as "every single ->new'ly allocated object will leak an entire C array". A slightly bigger bug ;) This PR already has one approval, so if nobody else shouts in the next 3 hours or so, I'm going to merge it anyway on the grounds that fixing 5 bugs while 1 still remains is better than not fixing any. When I do I'll open another Issue to track the remaining problem. |
348a97f
to
52eb69a
Compare
We forgot to free many of the additional structures that were allocated as part of the new class feature. Here they are fixed.