-
Notifications
You must be signed in to change notification settings - Fork 146
Fix Issue 468 #517
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 Issue 468 #517
Conversation
|
I have a better reproducing case for #468 which produces the problem 100% of the time, which I got by printing the polys being added using In principle one can try to construct a problematic poly add with artificially small buffer sizes, but this is never that easy to do... |
|
I think a large test file is acceptable, but maybe someone's editor doesn't like it. I haven't tested but putting the data in a separate file and using |
|
OK, I assumed that |
|
We need to add |
|
I think I am happy with this now. The I updated the checks in I constructed a more compact test, so the large file in I would certainly keep the first two commits separate (they fix different bugs). The test can be merged in with the second or not, as you prefer. |
Issue form-dev#468 has two bad cases, this commit addresses one of them. It can be when the SortBots are merging the sorted patches, that a higher level sort in the arguments of the polyratfun creates patches and needs to merge them. MergePatches needs a CompressBuffer, but that pointer was 0 if we arrived there from SortBotMerge.
During a MasterSort, if we end up calling MergePatches for a sort at sLevel>0 (or S!=AT.S0) (when sorting PolyRatFun arguments for eg) the output was sent to the master with PutToMaster instead of going via PutOut. This meant the terms escaped the PolyRatFun argument and ended up at ground level. This fixes form-dev#468
|
OK, I will merge this PR as it is. Thanks! |
|
Increasing |
|
That’s weird, I thought I had tested w2 properly also. I’ll look into it. It might be an idea to have some w2 tests in the GitHub actions set also, since indeed the sorting is different wrt the sortbots. |
|
The problem here is that
In There is a relevant comment: To use the BHEAD macro there (for consistency with the rest of the code, I suppose) we need to not set It is a bit surprising that this bug has not come up before. It is nothing to do with the size of the polynomials (as Issue #468 has been). The problem occurs for the test with |
|
OK, the bug was introduced in the FORM5 merge last year. Before that, |
These two commits definitely need some more eyes. In particular, there are two more
PutToMastercalls inEndSortthat I did not touch yet, probably they need thesLevelcheck as well.Please check the commit messages for details.