A bucket of various erts bug fixes#11288
Open
garazdawi wants to merge 16 commits into
Open
Conversation
When an update op contains a bignum, the heap size calculation only took that specific bignum into consideration, but any operation after that bignum would also (potentially) produce a big num. So instead we save the arity of the largest big num we find and use that as in the overestimate for the values we return.
When estimating the size it is important that we never smaller than what we need, so the doubles rounded in the table need to be rounded to their floor and not ceiling which is what Wo.Alpha does by default.
Not rejecting such atoms will cause a->len to overflow which causes all kinds of issues.
Before this they were truncated, which I think was due to the loader not being able to handle errors as nicely when the original call was introduced a long time ago. Rejecting such .beam files makes more sense.
Before this fix the '(iterations_until_trap - iters_for_bin) > 0' comparison would promote iterations_until_trap to Uint which would mean that the only time it would fail is when iterations_until_trap == iters_for_bin which disregarded the cases when iters_for_bin > iterations_until_trap.
The check used to test that the rhs was a bignum instead of the correct lhs.
Before this change any invalid seq trace token would just be passed along and would most likely cause segfaults as it was handled.
Before this fix, if you passed 1 bsl 32 as a buffer size, the Sint would wrap to a mnegative number causing memory to grow indefinitely while parsing a line.
The v_head was not decremented as it should when q->v_head->iov_base is assigned, so the wrong q item would have its base updates and the new iov_base would be unset.
Contributor
CT Test Results 4 files 225 suites 1h 55m 43s ⏱️ Results for commit f5003f0. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR contains a bucket of bug fixes to various parts of erts. Each commit is an isolated fix + testcase. I've chosen to bundle them as one PR instead of creating one for each as I think that will make it easier to review. If you want to have one PR per fix then let me know and I'll do that instead.
None of these bugs are rather serious as they have not been caught by any user (that I know of) yet, but the more we fix the better. Let me know if there is anything I can do to make the review process easier.