[PATCH] D68471: [scudo][standalone] Correct releaseToOS behavior
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 16:28:22 PDT 2019
morehouse accepted this revision.
morehouse added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/scudo/standalone/tests/primary_test.cpp:195
+// test for an error in how the release criteria were computed.
+template <typename Primary> static void testReleaseToOS() {
+ auto Deleter = [](Primary *P) {
----------------
cryptoad wrote:
> morehouse wrote:
> > Does this test the two cases mentioned in the description?
> >
> > - `< 1` page in use, `> 1` page in free list (should release)
> > - `< 1` page in free list (shouldn't release)
> >
> >
> >
> >
> Indeed, this tests the aforementioned first case, **not** the second one.
> I don't think I have a way to test that from here. One of the indicators being `LastReleaseAtNs` being updated (without released bytes), and it's not accessible.
> I'll see if I can toy with the prototype some more to bubble the information up the chain, unless you have an idea.
>
>
Is there a way to glean unmapped/released bytes from `GlobalStats`? If not, it seems like something worth adding to Scudo's telemetry.
I also see there's already a `printStats` method. Perhaps we could modify it to print into a buffer where we could extract the released metadata.
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68471/new/
https://reviews.llvm.org/D68471
More information about the llvm-commits
mailing list