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

Audit makefiles for bad >> usage, race condition #146

Open
reticulatedpines opened this issue May 28, 2024 · 0 comments
Open

Audit makefiles for bad >> usage, race condition #146

reticulatedpines opened this issue May 28, 2024 · 0 comments

Comments

@reticulatedpines
Copy link
Owner

In multiple places, we build up a file using >> with shell commands for concatenating output. If the target file is a dependency for a make target, e.g. version.c, which version.o depends on, and you build in parallel, it's possible for version.o to attempt to build with an intermediate version of the file, since it may exist on disk at any stage in the process of concatenating file data.

We should probably concat into a temp file, and move that to the correct name as the final step, so intermediate content cannot be seen.

reticulatedpines added a commit that referenced this issue Jun 28, 2024
We build a file with multiple append operations, parallel
make can see the created file part way through and trigger
dependent build targets.

There are other similar problems, audit is needed:
#146
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

No branches or pull requests

1 participant