Avoid hang when linting projects with symlink loops by per1234 · Pull Request #175 · arduino/arduino-lint (original) (raw)
Specific combinations of symlinks can cause infinite recursion loops during project discovery. This can be avoided by
limiting the depth of symlink follows to a reasonable number.
This was implemented in ef717d2 to make the project discovery code gracefully avoid perpetual recursion in this situation. Unfortunately, it turned out that the project data collection phase that comes after project discovery also suffers from the same problem. Fixing that is more difficult since the incompatible code is in Arduino CLI. So for now the provisional fix is to panic during the project discovery phase, which will at least avoid the far worse behavior of a permanent hang.