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
FIX: issues #3369, #4088, #4087, #4085, #4083, #4078, #4913 #4097
base: master
Are you sure you want to change the base?
Conversation
Thanks for diving into those complicated issue! 👍 That's really helpful. I'll review the code ASAP. |
1687 of 11000+ tests being executed turns out to be a GC bug. Insert |
Here's a candy in commit 9a857d0. A taste of design-by-contract for R/S, that so far has helped me to:
Rationale While we can easily tell that a four lines long function does what's expected, a function 50 lines long is usually a black box. We can only trust that it works, but we do not know that. For these longer functions it is imperative we have tools that can verify the algorithm. As a bonus we will spend less time double checking our own code. Sources of risk
Usage
Hope you will find this useful ☻ |
There is a PR for this GC bug. |
@qtxie oh! I thought it was merged :) |
Better to cherry-pick that commit in your branch to see if it will fix the issue. |
The tail of a series is the same as the beginning of the next series it adjacent to. If a direct pointer point to the tail of a series, the GC may think it's the beginning of a series and updated it to wrong value.
Yes, works great with those commits. |
Those fixes are from PR red#4097.
Those fixes are from PR #4097.
reminder: #4788 lists some bugs of this PR too also need to deal with crash on
likely just need to mark memory access in dyn-print |
1ec06cd
to
7218fb4
Compare
@dockimbel is there anything specific holding up the merge on this PR? |
It has conflicts now, but I don't want @hiiamboris to spend time on that if it's still not going to get merged for some other reason. |
Fixes #3369 , fixes #4078 , fixes #4083 , fixes #4085 , fixes #4087 , fixes #4088 , fixes #4100 , fixes #4913
This PR fixes numerous crashes in series-related functions, and includes a total rewrite of
change
andtake
. Lots of tests included.Series funcs behavior now follows the one I outlined in red/red in all edge cases. How it all works is seen from the tests, so I'm not duping it here.
next
,skip
,at
I do not plan to modify until we agree on some sort of series model.take/last/part
behavior is unchanged, only fixed, although I'm not happy with it (reasons)Status
This PR is ready for review, though a bit more work is
requireddesirable:move
funchas no tests at all, and it'svery unintuitive, I'd love to rewrite it as well (see unexpected behavior and access violation of MOVE/PART applied to the same series #3527 ); no tests for it so far;alter
has no tests eitherI didn't test select/pick/random/min/max yetI didn't run tests exceptseries-test.red
yetAll tests succeed when run from the console, but some heisenbug still remains, causingrun-all-interp.red
(when compiled only) to stop just afterfun-12
test, executing only 1687 of over 10k tests, ignorantly reporting a false successP.S. Added memory protection (see below)