Skip to content

A bucket of various erts bug fixes#11288

Open
garazdawi wants to merge 16 commits into
erlang:masterfrom
garazdawi:lukas/erts/fixes
Open

A bucket of various erts bug fixes#11288
garazdawi wants to merge 16 commits into
erlang:masterfrom
garazdawi:lukas/erts/fixes

Conversation

@garazdawi

Copy link
Copy Markdown
Member

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.

garazdawi added 16 commits June 16, 2026 14:35
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.
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

CT Test Results

    4 files    225 suites   1h 55m 43s ⏱️
3 851 tests 3 749 ✅ 102 💤 0 ❌
4 936 runs  4 810 ✅ 126 💤 0 ❌

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant