Skip to content

Commit

Permalink
fix data-races when running analysis
Browse files Browse the repository at this point in the history
Previously when we start an analysis of language/tool we controlled the
state of execution using the monitor package, but many objects use the
same instance of monitor doing updates and reads concurrent resulting
in possible data races. This commit drops the monitor package and replace
to use the `sync.WaitGroup` to control the state of go routines.
An improvement was also made to control the timeout of analysis using
`time.After` function to receive the channel when timeout occurred or close
the `done` channel when analysis finish. An mutex was added on Service
to avoid data races when adding errors on Analysis.
  • Loading branch information
matheusalcantarazup committed Jun 8, 2021
1 parent e79df68 commit c97451a
Show file tree
Hide file tree
Showing 43 changed files with 313 additions and 538 deletions.
3 changes: 2 additions & 1 deletion horusec-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"b176f4967e7b0e54faabb9688d1d9ff6f10959d4a34280b9e035bfd63c4f352e",
"316176f18dac308bbcfc3ece628796eb438c8387a7d0da83f583fcacab3a01c4",
"1dbef4655a4a2378e67acf89bf9b78c13041634a63a8ef0a84ff5e6237d17216",
"37fa0cfe47519c1b2b6a8e29538571b81fd8787ca4217825ae6d8dcf86d70de8"
"37fa0cfe47519c1b2b6a8e29538571b81fd8787ca4217825ae6d8dcf86d70de8",
"85492fbc829b64336a4f858022fbe52f05e27ee18d7a8fbdf5ffd23991ebd7a9"
],
"horusecCliFilesOrPathsToIgnore": [
"**/e2e/**",
Expand Down
Loading

0 comments on commit c97451a

Please sign in to comment.