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

Relax invariants checked by erts_add_taint before initialization #9307

Merged

Conversation

lexprfuncall
Copy link
Contributor

@lexprfuncall lexprfuncall commented Jan 16, 2025

Debug builds configured with static NIFs are currently not usable since they abort during startup. The abort is caused by a check in erts_add_taint that makes sense once the runtime has started but might not be meaningful before the runtime has been started, notably during static NIF initialization.

This change adds an additional check that allows erts_add_taint to proceed when called during runtime initialization. With this check, a debug with static NIFs can complete the startup process.

Resolves #9306

Copy link
Contributor

github-actions bot commented Jan 16, 2025

CT Test Results

    3 files    141 suites   49m 32s ⏱️
1 598 tests 1 549 ✅ 49 💤 0 ❌
2 307 runs  2 238 ✅ 69 💤 0 ❌

Results for commit a14c946.

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

@rickard-green rickard-green added the team:VM Assigned to OTP team VM label Jan 20, 2025
Debug builds configured with static NIFs are currently not usable
since they abort during startup.  The abort is caused by a check in
erts_add_taint that makes sense once the runtime has started but might
not be meaningful before the runtime has been started, notably during
static NIF initialization.

This change adds an additional check that allows erts_add_taint to
proceed when called during runtime initialization.  With this check,
a debug with static NIFs can complete the startup process.
@sverker sverker force-pushed the fix-static-nif-init-assertion-failure branch from 96f5cf5 to a14c946 Compare January 20, 2025 14:42
@sverker sverker changed the base branch from master to maint January 20, 2025 14:42
@sverker
Copy link
Contributor

sverker commented Jan 20, 2025

Thanks for the fix. I tweaked the commit and rebased your branch to be mergeable to maint for OTP 27.3.

@sverker sverker merged commit 9b159d1 into erlang:maint Jan 20, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runtime initialization fails for debug builds configured with static NIFs
3 participants