Documentation ¶
Index ¶
- Variables
- func Alive_mutexs(target_inst ssa.Instruction) []string
- func Alive_unlock(target_inst ssa.Instruction) string
- func C3_cleanup()
- func Detect()
- func FP_inside_func(fn *ssa.Function, call_insts []ssa.Instruction, target_inst ssa.Instruction) []ssa.Instruction
- func FP_loop_pkg(call_insts []ssa.Instruction, target_inst ssa.Instruction) []ssa.Instruction
- func Find_stmt_match(inst ssa.Instruction) string
- func Is_inst_end_of_fn(inst ssa.Instruction) bool
- func Is_self_lock(target_inst ssa.Instruction) bool
- func Is_self_lock_brutal(target_inst ssa.Instruction) bool
- func Is_self_unlock(target_inst ssa.Instruction) bool
- func Is_self_unlock_brutal(target_inst ssa.Instruction) bool
- func List_all_methods() []*ssa.Function
- type C3_struct
- type Debug_usage
- type Field_usage
- type MyStruct
Constants ¶
This section is empty.
Variables ¶
var C3_all_structs []*C3_struct
var C3_reported_fields []*Field_usage
Functions ¶
func Alive_mutexs ¶
func Alive_mutexs(target_inst ssa.Instruction) []string
func Alive_unlock ¶
func Alive_unlock(target_inst ssa.Instruction) string
Alive_unlock is an inverse version of alive_mutexs. It's aimed to find functions that contains a mutex that is only Unlocked, not Locked this function has limitations: it can only return one mutex that is only Unlocked; it will fail when the function is like "mu.Unlock(); mu.Lock(); mu.Unlock()"
func C3_cleanup ¶
func C3_cleanup()
func FP_inside_func ¶
func FP_inside_func(fn *ssa.Function, call_insts []ssa.Instruction, target_inst ssa.Instruction) []ssa.Instruction
func FP_loop_pkg ¶
func FP_loop_pkg(call_insts []ssa.Instruction, target_inst ssa.Instruction) []ssa.Instruction
func Find_stmt_match ¶
func Find_stmt_match(inst ssa.Instruction) string
func Is_inst_end_of_fn ¶
func Is_inst_end_of_fn(inst ssa.Instruction) bool
func Is_self_lock ¶
func Is_self_lock(target_inst ssa.Instruction) bool
If target_inst is a ssa.Call and it is calling a method naming "*.Lock()", we believe it is calling a function containing a lock
If it is calling a function that has a Mis-Unlock behavior, we believe it is calling a function containing a lock
func Is_self_lock_brutal ¶
func Is_self_lock_brutal(target_inst ssa.Instruction) bool
If target_inst is a ssa.Call and it is calling a method or function containing string "lock", we believe it is calling a function containing a lock
func Is_self_unlock ¶
func Is_self_unlock(target_inst ssa.Instruction) bool
If target_inst is a ssa.Call and it is calling something naming "*.Unlock()", we believe it is calling a function containing a Unlock
func Is_self_unlock_brutal ¶
func Is_self_unlock_brutal(target_inst ssa.Instruction) bool
If target_inst is a ssa.Call and it is calling a method or function containing "unlock", we believe it is calling a function containing a Unlock
func List_all_methods ¶
Types ¶
type C3_struct ¶
type C3_struct struct { Name string Field map[string](map[ssa.Instruction][]string) //map[field_name](map[inst_used_field][]str_alive_mutexs) }