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

Bug: Fix the unit_file_bin not being initialized #2784

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

Thirumalai-Shaktivel
Copy link
Member

Fixes: #2776

@Thirumalai-Shaktivel
Copy link
Member Author

Let's see if it fixes the failure.

@@ -1887,6 +1887,7 @@ void store_unit_file(int32_t unit_num, FILE* filep, bool unit_file_bin) {
}

FILE* get_file_pointer_from_unit(int32_t unit_num, bool *unit_file_bin) {
unit_file_bin = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be:

Suggested change
unit_file_bin = false;
*unit_file_bin = false;

Copy link
Contributor

@certik certik left a comment

Choose a reason for hiding this comment

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

I don't know if this is the right fix, we really need to start documenting what these functions are supposed to do. But it seems the API for this function is to return if the unit is a binary unit, in which case it was a bug that it returned a random value. So let's merge it and see.

@certik certik merged commit 13b4dab into lfortran:main Nov 3, 2023
20 checks passed
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.

CI flaky test: Binary content is not handled by write(..)
2 participants