All Projects → amit-davidson → Chronos

amit-davidson / Chronos

Licence: mit
Chronos - A static race detector for the go language

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Chronos

Sonar Java
☕️ SonarSource Static Analyzer for Java Code Quality and Security
Stars: ✭ 745 (+173.9%)
Mutual labels:  static-analysis, analysis, static-code-analysis
Security Code Scan
Vulnerability Patterns Detector for C# and VB.NET
Stars: ✭ 550 (+102.21%)
Mutual labels:  static-analysis, analysis, static-code-analysis
lints
Lint all your JavaScript, CSS, HTML, Markdown and Dockerfiles with a single command
Stars: ✭ 14 (-94.85%)
Mutual labels:  analysis, static-code-analysis, static-analysis
Phan
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.
Stars: ✭ 5,194 (+1809.56%)
Mutual labels:  static-analysis, analysis, static-code-analysis
Static Analysis
⚙️ A curated list of static analysis (SAST) tools for all programming languages, config files, build tools, and more.
Stars: ✭ 9,310 (+3322.79%)
Mutual labels:  static-analysis, static-code-analysis, analysis
Dg
[LLVM Static Slicer] Various program analyses, construction of dependence graphs and program slicing of LLVM bitcode.
Stars: ✭ 242 (-11.03%)
Mutual labels:  static-analysis, analysis, static-code-analysis
analysis-net
Static analysis framework for .NET programs.
Stars: ✭ 19 (-93.01%)
Mutual labels:  analysis, static-code-analysis, static-analysis
volkscv
A Python toolbox for computer vision research and project
Stars: ✭ 58 (-78.68%)
Mutual labels:  analysis, detection
OpenStaticAnalyzer
OpenStaticAnalyzer is a source code analyzer tool, which can perform deep static analysis of the source code of complex systems.
Stars: ✭ 19 (-93.01%)
Mutual labels:  static-code-analysis, static-analysis
Krane
Kubernetes RBAC static Analysis & visualisation tool
Stars: ✭ 254 (-6.62%)
Mutual labels:  static-analysis, analysis
codeclimate-eslint
Code Climate Engine for ESLint
Stars: ✭ 86 (-68.38%)
Mutual labels:  static-code-analysis, static-analysis
analysis-model
A library to read static analysis reports into a Java object model
Stars: ✭ 74 (-72.79%)
Mutual labels:  static-code-analysis, static-analysis
eba
EBA is a static bug finder for C.
Stars: ✭ 14 (-94.85%)
Mutual labels:  static-code-analysis, static-analysis
codeclimate-phpcodesniffer
Code Climate Engine for PHP Code Sniffer
Stars: ✭ 27 (-90.07%)
Mutual labels:  static-code-analysis, static-analysis
nakedret
nakedret is a Go static analysis tool to find naked returns in functions greater than a specified function length.
Stars: ✭ 82 (-69.85%)
Mutual labels:  static-code-analysis, static-analysis
micro-code-analyser
A tiny Node.js microservice to detect the language of a code snippet
Stars: ✭ 21 (-92.28%)
Mutual labels:  analysis, detection
custom-bytecode-analyzer
Java bytecode analyzer customizable via JSON rules
Stars: ✭ 66 (-75.74%)
Mutual labels:  analysis, static-analysis
SqlServer.Rules
SQL Server static code analysis rules for SSDT database projects
Stars: ✭ 20 (-92.65%)
Mutual labels:  analysis, static-analysis
static-code-analysis-plugin
A plugin to simplify Static Code Analysis on Gradle. Not restricted to, but specially useful, in Android projects, by making sure all analysis can access the SDK classes.
Stars: ✭ 36 (-86.76%)
Mutual labels:  static-code-analysis, static-analysis
static file analysis
Analysis of file (doc, pdf, exe, ...) in deep (emmbedded file(s)) with clamscan and yara rules
Stars: ✭ 34 (-87.5%)
Mutual labels:  analysis, static-analysis

Chronos

made-with-Go made-with-Go MIT license PRs Welcome amit-davidson

Chronos is a static race detector for the Go language written in Go.

Quick Start:

Download the package

go get -v github.com/amit-davidson/Chronos/cmd/chronos

Pass the entry point

chronos --file <path_to_main> --mod <path_to_module>

Help

Usage of ./chronos:
  --file string
    	The file containing the entry point of the program
  --mod string
    	Absolute path to the module where the search should be performed. Should end in the format:{VCS}/{organization}/{package}. Packages outside this path are excluded rom the search.

Example:

Features:

Support:

  • Detects races on pointers passed around the program.
  • Analysis of conditional branches, nested functions, interfaces, select, gotos, defers, for loops and recursions.
  • Synchronization using mutex and goroutines starts.

Limitations:

  • Big programs and external packages. (Due to stack overflow)
  • Synchronization using channels, waitgroups, once, cond and atomic.

Chronos vs go race:

Chronos successfully reports cases where go race fails thanks to it's static nature. Mostly because data races appear in unexpected production workloads, which are hard to produce in dev. In addition, go race is having trouble with short programs where without contrived synchronization the program may exit too quickly.

In contrast, Chronos managed to report only 244/403 = 60.5% of go race test cases. This can be explained by Chronos partial support with Go's features so this number will increase in the future. Also, it lacked due to his static nature where context/path sensitivity was required.

Therefore, I suggest using both according the strengths and weaknesses of each of the race detectors.

Credits:

Jan Wen, J., Jhala, R., & Lerner, S. (n.d.). RELAY: Static Race Detection on Millions of Lines of Code
Colin J. Fidge (February 1988). Timestamps in Message-Passing Systems That Preserve the Partial Ordering"

More examples:


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].