-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Deallocate resources for DacDbiArrayList with a matching deallocator #58791
Conversation
Tagging subscribers to this area: @tommcdon Issue DetailsFixes #57577 I deleted InfoStoreForDbiNew as there were no users. Added
|
b1d0668
to
01585a7
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.
LGTM provided we never include src/coreclr/debug/di/rspriv.h in DAC code.
The DBI and the DAC are different layers, so rspriv should never be included. That being said, I added a little safeguard. |
0834bbc
to
f8a1714
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.
Thank you!
/cc @am11
This codepath isn't tested in PR's (requires a debugger) so the failure is unrelated. @dotnet/dnceng this one is weird: https://helix.dot.net/api/2019-06-17/jobs/cdc48d0e-bc58-4865-910c-7ffb0284cd9a/workitems/System.IO.Compression.ZipFile.Tests/ looks like helix ended up with a partial upload |
I'm on it |
zip archive is not corrupted, machine is also in good shape. it looks like an downloading error |
Two distinct machines got the exact same error though (dci-mac-build-163, dci-mac-build-008), that makes it seem unlikely to be just bad luck.
So Python's zipfile API thought this was a bad zip on distinct machines, making it unlikely the original download got hit by a cosmic ray. If it's interesting (you merged already so maybe not) we could examine the payload zip in greater details. |
Sent some details offline, the archive can't unpack stuff it got from https://github.com/dotnet/runtime-assets/blob/main/src/System.IO.Compression.TestData/ZLibTestData/WebFiles/www.reddit.com6.23.2017.har.z so there's something malformed about your work item payload in this case. |
@hoyosjs, thanks for fixing DAC side of things. The remaining instances of |
Fixes #57577
I deleted InfoStoreForDbiNew as there were no users.
Added
DeleteDbiMemory
to deal with destruction of items and proper usage of the corresponding allocator. However, using this custom new here across dll boundaries is risky as theT
type will get its destructor called then the array list is destructed. The old implementation that used the CLR allocators didn't call the destructors on the inner elements (we had a potential leak, in practice it wasn't very noticeable - most objects are never deleted). After #55945, the standard array delete expression - as well as this change - call the destructor on every object. Currently, the instantiations of this type are all devoid of special destructors and are largely blittable structs, so this remains working as it was: