Skip to content
프로젝트

소개

Chronos - A static race detector for the go language

개발 도구

이 수치를 측정하는 방법

What you can do

  • 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.
  • Big programs and external packages. (Due to stack overflow)

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
+1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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 or relative 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:


관련 프로젝트 살펴보기

불러오는 중…