cmrx icon indicating copy to clipboard operation
cmrx copied to clipboard

Build system is not guarded against parallel execution

Open ventZl opened this issue 9 months ago • 0 comments

Part of the build system duties is to generate includes for the main linker script. This is a two-phase process:

First, the linker script is updated to contain include directives for includes which are generated to be empty.

Then, includes are appended with section for each process as they are discovered.

If CMake is executed twice in parallel (possible with some IDEs, which automatically launch CMake upon CMakeLists.txt editation) and user starts build, which also runs CMake as part of automatic build system regeneration, then it may happen, that these two instances align so that both recreate empty includes before any of them starts appending process sections into these files.

This is an extremely rare condition and basically a user error, so even mere detection of this situation and displaying error message is enough.

ventZl avatar Feb 26 '25 06:02 ventZl