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

Protect against uninitialized services #666

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

elbeno
Copy link
Contributor

@elbeno elbeno commented Jan 1, 2025

See #665

elbeno added 2 commits January 1, 2025 15:02
Problem:
- If services are uninitialized, either through not being exported properly, or
  through `nexus.init()` not being called, the service pointers are null and the
  resulting UB causes hard-to-diagnose effects.

Solution:
- Initialize services to functions that cause a runtime panic.
@elbeno elbeno changed the title Protect uninitialized services Protect against uninitialized services Jan 1, 2025
Copy link
Contributor

@lukevalenty lukevalenty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😎

@lukevalenty lukevalenty merged commit 9702670 into intel:main Jan 2, 2025
22 checks passed
@elbeno elbeno deleted the protect-uninit-service branch January 2, 2025 03:23
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.

2 participants