STM Weak test re-revision #558
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I recently had a fresh look at the weak array and weak hash set STM tests, and discovered a couple of things.
This PR is the outcome.
The weak array and weak hash set test originated in #214.
They've since been tweaked, e.g., in #365 which among other things switched to
int64
data for the weak hash sets test,arguing that this was faster to shrink. As we no longer shrink the
data
this argument no longer holds.Furthermore, the tests triggered crashes in the past with
string
data
in #283, which was caused by a combination of race conditions and variable length memory records. This speaks for reverting and usingstring
s for both tests. I've confirmed that both parallel tests can trigger segfaults on an older version (OCaml 5.0.0~alpha1) with these changes.The PR also
protect
calls with thunks, rather than the current missing-last-argument-closure