-
Notifications
You must be signed in to change notification settings - Fork 16
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
Dynarray tests #463
Dynarray tests #463
Conversation
Thanks a bunch for sharing this! 🙏 Here's a CI summary as I was seeing several red lights:
Out of 36 workflows the 29 test-running ones failed with compile-time errors |
I just pushed a few changes, partly to address some of the red lights. |
Thanks for taking care of that!
We should probably replace it with 0xcafe, or something. Also, the Lin test was triggering segfaults, presumably due to a leftover “operation” |
Remaining problems:
I don’t have the bandwidth to look at it today, but hopefully shortly. |
When devising a system to maintain a pool of Dynarrays as my SUT, I have neglected an issue with shrinking. Some commands cause a new Dynarray to be added to the pool and others take one or more Dynarrays as input. These Dynarray arguments are represented as list indices; when generating commands, care is taken to generate indices that are valid indices in the current list of arrays, given the previous commands. But when shrinking, some of the commands are arbitrarily removed, which leads to some of these indices to become invalid at the moment of the command’s execution and causes unexpected exceptions. |
I've taken a stab at this. The result now completes in a reasonable time:
Finally, I've rebased on |
I was a bit blocked by the shrinking issue and hadn’t thought of Thanks for doing what I neglected to do! This looks great to me. |
CI summary: all 33 workflows green. |
CI summary for merge to
Out of 34 workflows, 1 failed with a false alarm (timeout) |
(This PR is based on top of #462, which it depends on.)
The new module
Dynarray
has a rather tricky implementation as it is not designed for parallel use, but still strives to guarantee memory safety even in the event of such incorrect use. This implies a lot of subtle invariants to maintain. My local runs of this branch have exposed a bug in the initial implementation (ocaml/ocaml#12885 (comment)).