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

remove a data race by compiling the exclude regexes in the preprocess phase instead #677

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

istyf
Copy link

@istyf istyf commented Nov 2, 2024

This PR should fix #668 #655 and #530

The regular expressions, that are used to determine if files should be excluded, are compiled lazily on first request. This causes different kinds of timing related problems, including panics because multiple goroutines will end up compiling the expressions, while other goroutines may return with data that isn't complete.

… phase

the regex compilation was done lazily on first access but did not properly synchronize
for being accessed by multiple watcher goroutines

between the option of adding a mutex for something that (should) only ever happen
once and removing the potential for a race, this seems like the better choice
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.

Segfault When air Command Ran
1 participant