Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dfinkel
Copy link

@dfinkel dfinkel commented Apr 14, 2025

  • lru: simplify paranoid GC Linked List testing
    Move the paranoidLL constant to its own build-tagged files so we can
    toggle which mode is active by setting a build-tag on the test instead
    of having to use sed to modify the constant-value.

  • lru: rewrite FuzzTypedAddRemove
    Vastly simplify FuzzTypedAddRemove by limiting the keyspace, and make it
    more useful by providing triggers for running the GC in parallel.

    Use the two high-bits to select the operation and the low-6 bits the
    key. (this eliminates the degree of freedom where the fuzzer picks
    super-long keys, since it's effectively fuzzing the hash-table's
    hash-function.)

    Unfortunately, this does cause the fuzzer to explore the control flow in
    the Garbage Collector somewhat, (that's an unfortunate random walk),
    but when working with weak pointers, you really do need the GC to run to
    have any confidence that you didn't remove something you need.

dfinkel added 2 commits April 12, 2025 13:39
Move the `paranoidLL` constant to its own build-tagged files so we can
toggle which mode is active by setting a build-tag on the test instead
of having to use sed to modify the constant-value.
Vastly simplify FuzzTypedAddRemove by limiting the keyspace, and make it
more useful by providing triggers for running the GC in parallel.

Use the two high-bits to select the operation and the low-6 bits the
key. (this eliminates the degree of freedom where the fuzzer picks
super-long keys, since it's effectively fuzzing the hash-table's
hash-function.)

Unfortunately, this does cause the fuzzer to explore the control flow in
the Garbage Collector somewhat, (that's an unfortunate random walk),
but when working with weak pointers, you really do need the GC to run to
have any confidence that you didn't remove something you need.
@dfinkel dfinkel merged commit 2f5b56a into master Apr 14, 2025
20 checks passed
@dfinkel dfinkel deleted the lru_fuzz_simplification branch April 14, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants