structfield

package
v0.0.0-...-c039653 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2021 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var C3_all_structs []*C3_struct
View Source
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 Detect

func Detect()

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

func List_all_methods() []*ssa.Function

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)
}

type Debug_usage

type Debug_usage struct {
	Type          string
	Field_name    string
	Usage         map[string][]string
	Nu_locked     int
	Nu_not_locked int
}

type Field_usage

type Field_usage struct {
	Type          string
	Field_name    string
	Usage         map[ssa.Instruction][]string
	Debug_Usage   map[string][]string
	Nu_locked     int
	Nu_not_locked int
}

type MyStruct

type MyStruct struct {
	Name  string
	Field map[string]string
}

func List_all_struct

func List_all_struct(prog *ssa.Program) []*MyStruct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL