Skip to content
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

Survive loading damaged or obsolete BEAM files #8623

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

bjorng
Copy link
Contributor

@bjorng bjorng commented Jun 27, 2024

The runtime system could crash when attempting to load obsolete or damaged BEAM files (for example, loading code compiled by Erlang/OTP 23 in Erlang/OTP 27).

In the cleaning up of the off-heap list, don't crash when the
pointer to a fun entry is NULL. That can happen if loading failed
for some reason (the BEAM file was corrupted or too old).
Attempting to load an obsolete instruction with more than 6 operands
could crash the runtime system.
When attempting to load obsolete instructions, the loading
failed to recognize them and produced an unhelpful message
instead of a polite request to recompile the module.

This bug was introduced in 4dbc998.
@bjorng bjorng added team:VM Assigned to OTP team VM fix testing currently being tested, tag is used by OTP internal CI labels Jun 27, 2024
@bjorng bjorng self-assigned this Jun 27, 2024
@bjorng bjorng changed the base branch from master to maint June 27, 2024 15:04
Copy link
Contributor

github-actions bot commented Jun 27, 2024

CT Test Results

    3 files    141 suites   49m 33s ⏱️
1 589 tests 1 539 ✅ 49 💤 1 ❌
2 290 runs  2 220 ✅ 69 💤 1 ❌

For more details on these failures, see this check.

Results for commit 7ebe7f4.

♻️ 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

@bjorng bjorng merged commit e424399 into erlang:maint Jun 28, 2024
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant