[PATCH] D68471: [scudo][standalone] Correct releaseToOS behavior

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 15:45:18 PDT 2019


cryptoad marked an inline comment as done.
cryptoad added inline comments.


================
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) {
----------------
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.




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