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

run.c: Fix uninitialized field #11

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

razvand
Copy link

@razvand razvand commented Oct 8, 2023

The fd field in the Transformer structure is not initialized. Because of that, on certain code paths, calls to the system functions will use a wrong file descriptor. This causes an assertion failure in Unikraft.

Workaround for this was the commenting out of the CONFIG_LIBUKDEBUG_ENABLE_ASSERT configuration option in Unikraft.

Fix this by initializing fd to -1. This makes the current code fully functional on Unikraft, eliminating the assertion failure.

The `fd` field in the `Transformer` structure is not initialized.
Because of that, on certain code paths, calls to the system functions
will use a wrong file descriptor. This causes an assertion failure in
Unikraft.

Workaround for this was the commenting out of the
`CONFIG_LIBUKDEBUG_ENABLE_ASSERT` configuration option in Unikraft.

Fix this by initializing `fd` to -1. This makes the current code fully
functional on Unikraft, eliminating the assertion failure.

Signed-off-by: Razvan Deaconescu <[email protected]>
@trholding trholding merged commit ba0d8ca into trholding:master Oct 9, 2023
6 checks passed
@trholding
Copy link
Owner

Thank you!

@razvand razvand deleted the razvand/fix-uninitialized-fd branch June 11, 2024 17:06
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