repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/sys_api.go
server/router/system/sys_api.go
package system import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type ApiRouter struct{} func (s *ApiRouter) InitApiRouter(Router *gin.RouterGroup) { apiRouter := Router.Group("api").Use(middleware.OperationRecord()...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/sys_menu.go
server/router/system/sys_menu.go
package system import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type MenuRouter struct{} func (s *MenuRouter) InitMenuRouter(Router *gin.RouterGroup) (R gin.IRoutes) { menuRouter := Router.Group("menu").Use(middlew...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/sys_jwt.go
server/router/system/sys_jwt.go
package system import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" ) type JwtRouter struct{} func (s *JwtRouter) InitJwtRouter(Router *gin.RouterGroup) { jwtRouter := Router.Group("jwt") jwtApi := v1.ApiGroupApp.SystemApiGroup.JwtApi { jwtRouter.POST("jsonInBlacklist", j...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/sys_casbin.go
server/router/system/sys_casbin.go
package system import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type CasbinRouter struct{} func (s *CasbinRouter) InitCasbinRouter(Router *gin.RouterGroup) { casbinRouter := Router.Group("casbin").Use(middleware.Op...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/project.go
server/router/system/project.go
package system import ( "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type ProjectRouter struct { } // InitProjectRouter 初始化 Project 路由信息 func (s *ProjectRouter) InitProjectRouter(Router *gin.RouterGroup) { projectRouter :=...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/sys_user.go
server/router/system/sys_user.go
package system import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type UserRouter struct{} func (s *UserRouter) InitUserRouter(Router *gin.RouterGroup) { userRouter := Router.Group("user").Use(middleware.OperationRec...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/system/enter.go
server/router/system/enter.go
package system type RouterGroup struct { ApiRouter JwtRouter SysRouter BaseRouter MenuRouter UserRouter CasbinRouter AutoCodeRouter AuthorityRouter DictionaryRouter OperationRecordRouter DictionaryDetailRouter AuthorityBtnRouter ProjectRouter }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/run_case.go
server/router/interfacecase/run_case.go
package interfacecase import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type RunCaseRouter struct { } // InitRunCaseRouter RunCaseRouter 初始化 TestCase 路由信息 func (s *RunCaseRouter) InitRunCaseRouter(Router *gin.RouterG...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/py_pkg.go
server/router/interfacecase/py_pkg.go
package interfacecase import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type PyPkgRouter struct{} func (p *PyPkgRouter) InitPyPkgRouter(Router *gin.RouterGroup) { pyPkgRouter := Router.Group("pyPkg").Use(middleware.O...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/CI.go
server/router/interfacecase/CI.go
package interfacecase import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type ApiCIRouter struct{} func (ci ApiCIRouter) InitApiCIRouter(Router *gin.RouterGroup) { ciRouter := Router.Group("/ci") ciRouter.Use(middlew...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/apimenu.go
server/router/interfacecase/apimenu.go
package interfacecase import ( "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type ApiMenuRouter struct { } // InitApiMenuRouter 初始化 ApiMenu 路由信息 func (s *ApiMenuRouter) InitApiMenuRouter(Router *gin.RouterGroup) { apiMenuR...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/timer_task.go
server/router/interfacecase/timer_task.go
package interfacecase import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type TimerTaskRouter struct { } // InitTimerTaskRouter 初始化 TimerTask 路由信息 func (s *TimerTaskRouter) InitTimerTaskRouter(Router *gin.RouterGroup)...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/interface_template.go
server/router/interfacecase/interface_template.go
package interfacecase import ( "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type InterfaceTemplateRouter struct { } // InitInterfaceTemplateRouter 初始化 InterfaceTemplate 路由信息 func (s *InterfaceTemplateRouter) InitInterfaceTe...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/environment.go
server/router/interfacecase/environment.go
package interfacecase import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type EnvironmentRouter struct { } func (env *EnvironmentRouter) InitEnvironmentRouter(Router *gin.RouterGroup) { envRouter := Router.Group("")....
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/performance.go
server/router/interfacecase/performance.go
package interfacecase import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type PerformanceRouter struct { } // InitPerformanceRouter 初始化 TimerTask 路由信息 func (s *PerformanceRouter) InitPerformanceRouter(Router *gin.Rout...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/api_config.go
server/router/interfacecase/api_config.go
package interfacecase import ( "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type ApiConfigRouter struct { } // InitApiConfigRouter 初始化 ApiConfig 路由信息 func (s *ApiConfigRouter) InitApiConfigRouter(Router *gin.RouterGroup) { ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/api_case_step.go
server/router/interfacecase/api_case_step.go
package interfacecase import ( "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type TestCaseRouter struct { } // InitTestCaseRouter 初始化 TestCase 路由信息 func (s *TestCaseRouter) InitTestCaseRouter(Router *gin.RouterGroup) { test...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/report.go
server/router/interfacecase/report.go
package interfacecase import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type ReportRouter struct { } // InitReportRouter ReportRouter 初始化 TestCase 路由信息 func (s *ReportRouter) InitReportRouter(Router *gin.RouterGroup)...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/message.go
server/router/interfacecase/message.go
package interfacecase import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type MessageRouter struct { } func (msg *MessageRouter) InitMessageRouter(Router *gin.RouterGroup) { msgRouter := Router.Group("").Use(middlewar...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/enter.go
server/router/interfacecase/enter.go
package interfacecase type RouterGroup struct { // Code generated by server Begin; DO NOT EDIT. ApiMenuRouter InterfaceTemplateRouter TestCaseRouter ApiCaseRouter PyPkgRouter ApiCIRouter // Code generated by server End; DO NOT EDIT. } type ApiCaseGroup struct { ApiCaseRouter } type ReportRouterGroup struct...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/interfacecase/api_case.go
server/router/interfacecase/api_case.go
package interfacecase import ( "github.com/gin-gonic/gin" "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type ApiCaseRouter struct { } // InitApiCaseRouter 初始化 ApiCase 路由信息 func (s *ApiCaseRouter) InitApiCaseRouter(Router *gin.RouterGroup) { taskRoute...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/example/exa_customer.go
server/router/example/exa_customer.go
package example import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" "github.com/test-instructor/yangfan/server/middleware" ) type CustomerRouter struct{} func (e *CustomerRouter) InitCustomerRouter(Router *gin.RouterGroup) { customerRouter := Router.Group("customer").Use(mid...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/example/exa_file_upload_and_download.go
server/router/example/exa_file_upload_and_download.go
package example import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" ) type FileUploadAndDownloadRouter struct{} func (e *FileUploadAndDownloadRouter) InitFileUploadAndDownloadRouter(Router *gin.RouterGroup) { fileUploadAndDownloadRouter := Router.Group("fileUploadAndDownload"...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/example/exa_excel.go
server/router/example/exa_excel.go
package example import ( "github.com/gin-gonic/gin" v1 "github.com/test-instructor/yangfan/server/api/v1" ) type ExcelRouter struct{} func (e *ExcelRouter) InitExcelRouter(Router *gin.RouterGroup) { excelRouter := Router.Group("excel") exaExcelApi := v1.ApiGroupApp.ExampleApiGroup.ExcelApi { excelRouter.POST(...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/server/router/example/enter.go
server/router/example/enter.go
package example type RouterGroup struct { ExcelRouter CustomerRouter FileUploadAndDownloadRouter }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/master/main.go
master/main.go
package main import ( "fmt" "github.com/rs/zerolog" "github.com/test-instructor/yangfan/master/server" "github.com/test-instructor/yangfan/server/core" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/grpc/client" "github.com/test-instructor/yangfan/server/grpc/pkg" ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/master/server/grpc.go
master/server/grpc.go
package server import ( "context" "errors" "github.com/test-instructor/yangfan/hrp" "github.com/test-instructor/yangfan/hrp/pkg/boomer" "github.com/test-instructor/yangfan/proto/master" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "time" ) type masterServer struct { master.Unimplement...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/master/server/boom.go
master/server/boom.go
package server import ( "context" "github.com/test-instructor/yangfan/hrp" "github.com/test-instructor/yangfan/hrp/pkg/boomer" "sync" ) type State int var b *MasterBoom var mutex sync.Mutex var ( StateRunning State = 1 StateStop State = 2 ) var _ = []State{StateRunning, StateStop} type MasterBoom struct ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/master/server/server.go
master/server/server.go
package server import ( "github.com/test-instructor/yangfan/proto/master" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/reflection" "net" "strings" ) var ns *grpc.Server func StartGrpc(address string) { global.GVA_LOG.Info("grpc server r...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/registry.go
pkg/inst/registry.go
package inst func NewPassRegistry() *PassRegistry { return &PassRegistry{ n2p: make(map[string]InstPassConstructor), } } // AddPass adds a unique pass into registry func (r *PassRegistry) Register(name string, passc InstPassConstructor) error { _, exist := r.n2p[name] if exist { return &PassExistedError{Name:...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/util.go
pkg/inst/util.go
package inst import ( "fmt" "go/ast" "go/format" "go/token" "io/fs" "os" "golang.org/x/tools/go/ast/astutil" ) func AddImport(fs *token.FileSet, ast *ast.File, name string, path string) error { for _, vecImportSpec := range astutil.Imports(fs, ast) { for _, importSpec := range vecImportSpec { if importS...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/err.go
pkg/inst/err.go
package inst import ( "fmt" ) type NoPassError struct { Name string } func (e *NoPassError) Error() string { return fmt.Sprintf("pass '%s' does not exist", e.Name) } type PassExistedError struct { Name string } func (e *PassExistedError) Error() string { return fmt.Sprintf("pass '%s' already existed", e.Name)...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/type.go
pkg/inst/type.go
package inst import ( "go/ast" "go/token" "go/types" "golang.org/x/tools/go/ast/astutil" ) // InstContext contains all information needed to instrument one single Golang source code. type InstContext struct { File string OriginalContent []byte FS *token.FileSet AstFile *ast.Fi...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/run.go
pkg/inst/run.go
package inst import ( "go/ast" "golang.org/x/tools/go/ast/astutil" ) // runPasses executes given passes with provided instrumentation context func runPasses(iCtx *InstContext, passes []InstPass) error { for _, p := range passes { err := RunPass(p, iCtx) if err != nil { return err } } return nil } // R...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/instctx.go
pkg/inst/instctx.go
package inst import ( "go/ast" "go/importer" "go/parser" "go/token" "go/types" "io/ioutil" "log" ) // NewInstContext creates a InstContext by given Golang source file func NewInstContext(goSrcFile string) (*InstContext, error) { oldSource, err := ioutil.ReadFile(goSrcFile) if err != nil { return nil, err ...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/registry_test.go
pkg/inst/registry_test.go
package inst import ( "testing" "golang.org/x/tools/go/ast/astutil" ) type MockPass struct{} func (p *MockPass) Deps() []string { return nil } func (p *MockPass) Before(*InstContext) { } func (p *MockPass) After(*InstContext) { } func (p *MockPass) GetPreApply(*InstContext) func(*astutil.Cursor) bool { retur...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/stats/stats.go
pkg/inst/stats/stats.go
package stats import "gfuzz/pkg/stats" type GoOp string const ( ChSend GoOp = "chsend" ChMake GoOp = "chmake" ChRecv GoOp = "chrecv" ChClose GoOp = "chclose" ) var ( codeStats = stats.NewStats() ) func IncGoOp(op GoOp) { codeStats.Inc(string(op)) } func SetSelectNumOfCases(selectID string, numOfCases uin...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/pass/wgrec.go
pkg/inst/pass/wgrec.go
package pass import ( "gfuzz/pkg/inst" "go/ast" "go/token" "strconv" "golang.org/x/tools/go/ast/astutil" ) // WgResPass, Wait Group Record Pass. type WgRecPass struct{} func (p *WgRecPass) Name() string { return "wgrec" } func (p *WgRecPass) Before(iCtx *inst.InstContext) { iCtx.SetMetadata(MetadataKeyRequir...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/pass/chrec.go
pkg/inst/pass/chrec.go
package pass import ( "gfuzz/pkg/inst" "go/ast" "go/token" "strconv" "golang.org/x/tools/go/ast/astutil" ) // ChResPass, Channel Record Pass. This pass instrumented at // following four channel related operations: // send, recv, make, close type ChRecPass struct { } func (p *ChRecPass) Name() string { return ...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/pass/utils.go
pkg/inst/pass/utils.go
package pass import ( "gfuzz/pkg/inst" "go/ast" ) func getSelectorCallerType(iCtx *inst.InstContext, selExpr *ast.SelectorExpr) string { if callerIdent, ok := selExpr.X.(*ast.Ident); ok { if callerIdent.Obj != nil { if objStmt, ok := callerIdent.Obj.Decl.(*ast.AssignStmt); ok { if objIdent, ok := objStmt....
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/pass/oraclert_shared.go
pkg/inst/pass/oraclert_shared.go
package pass import ( "sync" ) var opID uint16 var opMu sync.Mutex var records []string var recMu sync.Mutex func getNewOpID() uint16 { opMu.Lock() defer opMu.Unlock() opID++ return opID } func addRecord(record string) { recMu.Lock() defer recMu.Unlock() records = append(records, record) }
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/pass/mtxrec.go
pkg/inst/pass/mtxrec.go
package pass import ( "gfuzz/pkg/inst" "go/ast" "go/token" "strconv" "golang.org/x/tools/go/ast/astutil" ) // MtxResPass, Mutex (and RWMutex) Record Pass. type MtxRecPass struct{} func (p *MtxRecPass) Before(iCtx *inst.InstContext) { iCtx.SetMetadata(MetadataKeyRequiredOrtImport, false) } func (p *MtxRecPass...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/pass/selefcm.go
pkg/inst/pass/selefcm.go
package pass import ( "fmt" "gfuzz/pkg/inst" "go/ast" "go/token" "path/filepath" "strconv" "golang.org/x/tools/go/ast/astutil" ) // SelEfcm, select enforcement pass, instrument the 'select' keyword, // turn it into a select with multiple cases, each case represent one // original select's case and a timeout c...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/pass/chlc.go
pkg/inst/pass/chlc.go
package pass import ( "gfuzz/pkg/inst" "go/ast" "go/token" "strings" "golang.org/x/tools/go/ast/astutil" ) // ChLifeCyclePass tries to mark channel's end type ChLifeCyclePass struct { chMakeOutsideUsedInGs map[*ast.GoStmt]map[string]struct{} chMakeInGs map[*ast.GoStmt]map[string]struct{} requiredO...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/pass/oracle.go
pkg/inst/pass/oracle.go
package pass import ( "gfuzz/pkg/inst" "go/ast" "go/token" "strings" "golang.org/x/tools/go/ast/astutil" ) // OraclePass, instrument the oracle entry and defer function call to trigger oracle bug detection type OraclePass struct{} func (p *OraclePass) Before(iCtx *inst.InstContext) { iCtx.SetMetadata(Metadata...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/pass/cvrec.go
pkg/inst/pass/cvrec.go
package pass import ( "gfuzz/pkg/inst" "go/ast" "go/token" "strconv" "golang.org/x/tools/go/ast/astutil" ) // CvResPass, Conditional Variable Pass. type CvRecPass struct{} func (p *CvRecPass) Before(iCtx *inst.InstContext) { iCtx.SetMetadata(MetadataKeyRequiredOrtImport, false) } func (p *CvRecPass) After(iC...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/inst/pass/oraclert_const.go
pkg/inst/pass/oraclert_const.go
package pass const ( oraclertImportName = "oraclert" oraclertImportPath = "gfuzz/pkg/oraclert" MetadataKeyRequiredOrtImport = "RequiredOrtImport" )
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/gexec/list_pkgtest.go
pkg/gexec/list_pkgtest.go
package gexec import ( "bytes" "context" "fmt" "io" "log" "os" oe "os/exec" "path" "strings" "time" ) // ListPackages lists all packages in the current module // (Has to be run at the directory contains go.mod) func ListPackages(goModRootPath string) ([]string, error) { cmd := oe.Command("go", "list", "./....
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/gexec/list_bintest.go
pkg/gexec/list_bintest.go
package gexec import ( "bytes" "gfuzz/pkg/utils/fs" "io" "log" "os/exec" ) func ListExecutablesFromTestBinGlobs(globs []string) ([]Executable, error) { var tests []Executable for _, glob := range globs { ts, err := ListExecutablesFromTestBinGlob(glob) if err != nil { log.Printf("ListExecutablesFromTestB...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/gexec/types.go
pkg/gexec/types.go
package gexec import ( "context" "errors" "fmt" "os/exec" "path" "strings" ) // Executable represents a target that can be triggered by the fuzzer. // It usually is the program after instrumentation (so that it has oracle at runtime) type Executable interface { // Return a cmd that can be executed GetCmd(ctx ...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/gexecfuzz/types_test.go
pkg/fuzz/gexecfuzz/types_test.go
package gexecfuzz import ( "gfuzz/pkg/oraclert/config" "gfuzz/pkg/selefcm" "gfuzz/pkg/utils/hash" "testing" ) func TestHasOrtCfgHash(t *testing.T) { gexec := NewGExecFuzz(nil) cfg1 := &config.Config{ DumpSelects: true, SelEfcm: selefcm.SelEfcmConfig{ SelTimeout: 500, Efcms: []selefcm.SelEfcm{ { ...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/gexecfuzz/types.go
pkg/fuzz/gexecfuzz/types.go
package gexecfuzz import ( "gfuzz/pkg/gexec" "gfuzz/pkg/oraclert/output" "sync" ) // GExecFuzz all information about fuzzing progress for given executable type GExecFuzz struct { BestScore int Exec gexec.Executable // mapping from oracle config hash to timeout count ortCfg2TimeoutCnt map[string]uint32 o...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/interest/impl_test.go
pkg/fuzz/interest/impl_test.go
package interest import ( "gfuzz/pkg/oraclert/config" "gfuzz/pkg/selefcm" "gfuzz/pkg/utils/hash" "testing" ) func TestCfgHashEq(t *testing.T) { cfg1 := &config.Config{ SelEfcm: selefcm.SelEfcmConfig{ SelTimeout: 500, Efcms: []selefcm.SelEfcm{ { ID: "abc.go:123", Case: 1, }, }, },...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/interest/efcm_cov.go
pkg/fuzz/interest/efcm_cov.go
package interest import ( "gfuzz/pkg/oraclert/output" "gfuzz/pkg/selefcm" ) func IsEfcmCovered(efcms []selefcm.SelEfcm, records []output.SelectRecord) bool { records_cache := make(map[string]map[int]struct{}) for _, r := range records { if _, exist := records_cache[r.ID]; !exist { records_cache[r.ID] = make(...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/interest/impl.go
pkg/fuzz/interest/impl.go
package interest import ( "fmt" "gfuzz/pkg/fuzz/api" "gfuzz/pkg/fuzz/gexecfuzz" "gfuzz/pkg/fuzz/mutate" "gfuzz/pkg/fuzz/score" "gfuzz/pkg/utils/bits" "gfuzz/pkg/utils/hash" "gfuzz/pkg/utils/rand" "log" "strconv" "strings" ) type InterestHandlerImpl struct { fctx *api.Context } func NewInterestHandlerImpl...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/interest/efcm_cov_test.go
pkg/fuzz/interest/efcm_cov_test.go
package interest import ( "gfuzz/pkg/oraclert/output" "gfuzz/pkg/selefcm" "testing" ) func TestIsEfcmCoveredHappy(t *testing.T) { efcms := []selefcm.SelEfcm{ { ID: "abc.go:1", Case: 1, }, { ID: "abc.go:3", Case: 4, }, } records := []output.SelectRecord{ { ID: "abc.go:1", Cho...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/score/impl.go
pkg/fuzz/score/impl.go
package score import ( "gfuzz/pkg/fuzz/api" "math" ) const ( ScoreTupleCountLog2 = 1 ScoreCh = 10 ScoreNewClosed = 10 ScoreNewNotClosed = 10 ScoreBuf = 10 ) type ScoreStrategyImpl struct { fctx *api.Context } func NewScoreStrategyImpl(fctx *api.Context) api.ScoreStrategy { ret...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/metrics/metrics.go
pkg/fuzz/metrics/metrics.go
package metrics // "github.com/edsrzf/mmap-go" TODO: use mmap to increase performance // type Metrics struct { // // Map from bug ID to stdout file // Bugs map[string]*BugMetrics // NumOfBugsFound uint64 // NumOfRuns uint64 // NumOfFuzzQueryEntry uint64 // // How many test cases/bi...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/api/exec.go
pkg/fuzz/api/exec.go
package api import ( "encoding/json" "fmt" "gfuzz/pkg/gexec" "gfuzz/pkg/oraclert/config" "gfuzz/pkg/oraclert/output" "path" "path/filepath" ) // Stage indicates how we treat/response to an input and corresponding output type Stage string const ( // InitStage simply run the empty without any mutation InitSta...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/api/interest_list.go
pkg/fuzz/api/interest_list.go
package api import ( "fmt" "log" "sync" "sync/atomic" ) type InterestList struct { // interestedInputs contains a list of interested input interestedInputs []*InterestInput // initInputs contains only init stage initInputs []*InterestInput rw sync.RWMutex Dirty bool // inputs changed before H...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/api/interfaces.go
pkg/fuzz/api/interfaces.go
package api import ( "gfuzz/pkg/utils/bits" ) // ScoreStrategy is used in interest type ScoreStrategy interface { // Score will score an exec input Score(i *Input, o *Output) (int, error) } type InterestReason bits.Bits const ( NoInterest InterestReason = 0 SelEfcmNotCovered InterestReason = 1 << iota ...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/api/interest_input.go
pkg/fuzz/api/interest_input.go
package api func NewUnexecutedInterestInput(i *Input) *InterestInput { return &InterestInput{ Input: i, Executed: false, Output: nil, } } func NewExecutedInterestInput(i *Input, o *Output) *InterestInput { return &InterestInput{ Input: i, Executed: true, Output: o, } }
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/api/context.go
pkg/fuzz/api/context.go
package api import ( "gfuzz/pkg/fuzz/config" "gfuzz/pkg/fuzz/gexecfuzz" "gfuzz/pkg/gexec" "sync" "sync/atomic" "time" ) // Context record all necessary information for help fuzzer to prioritize input and record process. type Context struct { ExecInputCh chan *Input // channel for w...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/api/interest_list_test.go
pkg/fuzz/api/interest_list_test.go
package api import ( "gfuzz/pkg/fuzz/api" "testing" "time" ) type TestInterestHandler struct { shoulTouch map[*InterestInput]bool t *testing.T } func (m *TestInterestHandler) IsInterested(i *Input, o *Output, isFoundNewSelect bool) (bool, error) { return false, nil } func (m *TestInterestHandler) Han...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/config/cfg.go
pkg/fuzz/config/cfg.go
package config type Config struct { OracleRtDebug bool OutputDir string // Output directory, each folder contains output(stdout), record (generated by gooracle) and input (generated by fuzzer/changed by goorcle at first run) GlobalTuple bool // Recording executed select combination i...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/mutate/no_mutate.go
pkg/fuzz/mutate/no_mutate.go
package mutate import ( "gfuzz/pkg/fuzz/gexecfuzz" "gfuzz/pkg/oraclert/config" "gfuzz/pkg/oraclert/output" ) type NoMutateStrategy struct { } func (d *NoMutateStrategy) Mutate(g *gexecfuzz.GExecFuzz, curr *config.Config, o *output.Output, energy int) ([]*config.Config, error) { var cfgs []*config.Config for i :...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/mutate/random_mutate.go
pkg/fuzz/mutate/random_mutate.go
package mutate import ( "gfuzz/pkg/fuzz/gexecfuzz" "gfuzz/pkg/oraclert/config" "gfuzz/pkg/oraclert/output" "gfuzz/pkg/selefcm" "gfuzz/pkg/utils/rand" "log" ) type RandomMutateStrategy struct { SelEfcmTimeout int FixedSelEfcmTimeout bool } func (d *RandomMutateStrategy) Mutate(g *gexecfuzz.GExecFuzz, cur...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/mutate/nfb_mutate.go
pkg/fuzz/mutate/nfb_mutate.go
package mutate import ( "gfuzz/pkg/fuzz/gexecfuzz" "gfuzz/pkg/oraclert/config" "gfuzz/pkg/oraclert/output" "gfuzz/pkg/selefcm" "gfuzz/pkg/utils/rand" "log" ) // NfbRandomMutateStrategy is for rand stage with non-feedback mode type NfbRandomMutateStrategy struct { SelEfcmTimeout int FixedSelEfcmTimeout bo...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/mutate/types.go
pkg/fuzz/mutate/types.go
package mutate import ( "gfuzz/pkg/fuzz/gexecfuzz" "gfuzz/pkg/oraclert/config" "gfuzz/pkg/oraclert/output" ) type OrtConfigMutateStrategy interface { Mutate(g *gexecfuzz.GExecFuzz, curr *config.Config, o *output.Output, energy int) ([]*config.Config, error) }
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/mutate/mem_rand_mutate.go
pkg/fuzz/mutate/mem_rand_mutate.go
package mutate import ( "gfuzz/pkg/fuzz/gexecfuzz" "gfuzz/pkg/oraclert/config" "gfuzz/pkg/oraclert/output" "gfuzz/pkg/selefcm" "gfuzz/pkg/utils/rand" "log" ) // generate missing cases by history records if possible type MemRandMutateStrategy struct { SelEfcmTimeout int FixedSelEfcmTimeout bool } func (d...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/mutate/mem_rand_mutate_test.go
pkg/fuzz/mutate/mem_rand_mutate_test.go
package mutate import ( "gfuzz/pkg/selefcm" "testing" ) // func TestMemRandMutateHappy(t *testing.T) { // triggeredCases := make(map[string][]int) // var strat OrtConfigMutateStrategy // strat = &MemRandMutateStrategy{} // gef := gexecfuzz.NewGExecFuzz(nil) // gef.CaseRecords = triggeredCases // currCfg :=...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/mutate/deter_mutate.go
pkg/fuzz/mutate/deter_mutate.go
package mutate import ( "gfuzz/pkg/fuzz/gexecfuzz" "gfuzz/pkg/oraclert/config" "gfuzz/pkg/oraclert/output" "gfuzz/pkg/selefcm" ) type DeterMutateStrategy struct{} func (d *DeterMutateStrategy) Mutate(g *gexecfuzz.GExecFuzz, curr *config.Config, o *output.Output, energy int) ([]*config.Config, error) { if o == n...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzz/mutate/deter_mutate_test.go
pkg/fuzz/mutate/deter_mutate_test.go
package mutate import ( "gfuzz/pkg/oraclert/config" "gfuzz/pkg/oraclert/output" "testing" ) func TestDeterMutateStrategy(t *testing.T) { var mts OrtConfigMutateStrategy = &DeterMutateStrategy{} curr := config.NewConfig() curr.DumpSelects = true output := &output.Output{ Selects: []output.SelectRecord{ { ...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzzer/exec.go
pkg/fuzzer/exec.go
package fuzzer import ( "context" "errors" "fmt" "gfuzz/pkg/fuzz/api" "gfuzz/pkg/fuzz/config" "gfuzz/pkg/fuzzer/bug" ortCfg "gfuzz/pkg/oraclert/config" ortEnv "gfuzz/pkg/oraclert/env" ortOut "gfuzz/pkg/oraclert/output" "gfuzz/pkg/utils/hash" "io/ioutil" "log" "os" "strings" "time" ) func Run(ctx contex...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzzer/shuffle.go
pkg/fuzzer/shuffle.go
package fuzzer import ( "gfuzz/pkg/gexec" "math/rand" "time" ) func Shuffle(vals []gexec.Executable) { r := rand.New(rand.NewSource(time.Now().Unix())) for n := len(vals); n > 0; n-- { randIndex := r.Intn(n) vals[n-1], vals[randIndex] = vals[randIndex], vals[n-1] } }
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzzer/worker.go
pkg/fuzzer/worker.go
package fuzzer import ( "context" "fmt" gLog "gfuzz/pkg/fuzzer/log" "log" "strconv" "sync" ) // startWorkers starts parallel workers working on inputCh from fuzzer context. func startWorkers(parallel int, worker func(context.Context)) { var wg sync.WaitGroup for i := 1; i <= parallel; i++ { wg.Add(1) // ...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzzer/main.go
pkg/fuzzer/main.go
package fuzzer import ( "context" "gfuzz/pkg/fuzz/api" "gfuzz/pkg/fuzz/config" "gfuzz/pkg/fuzz/gexecfuzz" "gfuzz/pkg/gexec" ortconfig "gfuzz/pkg/oraclert/config" "log" "os" "sync/atomic" ) var ( runningTasks int32 exited uint32 ) // Reply run the fuzzing with given oracle runtime configuration and g...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzzer/bug/bug.go
pkg/fuzzer/bug/bug.go
package bug import ( "fmt" "log" "strconv" "strings" ) type bugInfo struct { id string // could be the blocking location or the creation location of blocking primitive; // example:"/data/ziheng/shared/gotest/stubs/etcd/src/go.etcd.io/etcd/pkg/schedule/schedule.go:219" strBlockLoc string // one of strBlo...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzzer/bug/bug_test.go
pkg/fuzzer/bug/bug_test.go
package bug import ( "gfuzz/pkg/utils/arr" "testing" ) func TestGetListOfBugIDFromStdoutContentHappyNonBlocking(t *testing.T) { content := `=== RUN TestGrpc1687 -----New NonBlocking Bug: ---Stack: goroutine 9 [running]: runtime.ReportNonBlockingBug(...) /usr/local/go/src/runtime/myoracle.go:538 command-line-arg...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzzer/terminal/terminal.go
pkg/fuzzer/terminal/terminal.go
package terminal import ( "fmt" "gfuzz/pkg/fuzz/api" "os" "text/tabwriter" "time" ) type TerminalReport struct { Bugs int Duration time.Duration Runs uint64 } func (t *TerminalReport) GetTerminalRows() []string { return []string{ fmt.Sprintf("# of Runs:\t%d", t.Runs), fmt.Sprintf("# of Bugs:\t%d...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/fuzzer/log/logger.go
pkg/fuzzer/log/logger.go
package log import ( "io" "log" "os" ) var ( logWriter io.Writer // could be io.MultiWriter or simply other writer fileWriter io.Writer // log file writer ) const ( logFlag = log.Ldate | log.Ltime | log.Lmsgprefix ) func SetupLogger(logFile string, stdout bool) { file, err := os.OpenFile(logFile, os.O_CREAT...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/stats/stats.go
pkg/stats/stats.go
package stats import "sync" type stats struct { m sync.Mutex stats map[string]uint64 } func NewStats() *stats { return &stats{ stats: make(map[string]uint64), } } func (s *stats) Inc(name string) { s.m.Lock() defer s.m.Unlock() s.stats[name]++ } func (s *stats) Set(name string, value uint64) { s.m.Lo...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/stats/serialize_test.go
pkg/stats/serialize_test.go
package stats_test import ( "gfuzz/pkg/stats" "sync" "testing" ) func TestIncHappy(t *testing.T) { stats := stats.NewStats() stats.Inc("abc") if stats.Get("abc") != 1 { t.Fail() } stats.Inc("abc") if stats.Get("abc") != 2 { t.Fail() } if stats.Get("acdsdf") != 0 { t.Fail() } } func TestConcurr...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/stats/serialize.go
pkg/stats/serialize.go
package stats import ( "encoding/json" "io/ioutil" "os" ) func Serialize(s *stats) ([]byte, error) { j, err := json.Marshal(struct { Stats map[string]uint64 }{ Stats: s.stats, }) if err != nil { return nil, err } return j, nil } func Deserialize(data []byte) (*stats, error) { b := struct { Stats ma...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/utils/hash/hash.go
pkg/utils/hash/hash.go
package hash import ( "crypto/sha256" "fmt" ) type Hashable interface { Hash() string } func AsSha256(o interface{}) string { h := sha256.New() h.Write([]byte(fmt.Sprintf("%v", o))) return fmt.Sprintf("%x", h.Sum(nil)) }
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/utils/arr/arr.go
pkg/utils/arr/arr.go
package arr func Contains(s []string, e string) bool { for _, a := range s { if a == e { return true } } return false }
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/utils/rand/rand.go
pkg/utils/rand/rand.go
package rand import ( "crypto/rand" "fmt" "math/big" ) func GetRandomWithMax(max int) int { i, err := rand.Int(rand.Reader, big.NewInt(int64(max))) if err != nil { fmt.Println("Crypto/rand returned non-nil errors: ", err) return 0 } return int(i.Int64()) }
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/utils/gofmt/fmt.go
pkg/utils/gofmt/fmt.go
package gofmt import ( "bytes" "errors" "fmt" "io" "log" "os" "os/exec" "path" ) func HasSyntaxError(goSrcFile string) bool { cmd := exec.Command("go", "fmt", goSrcFile) var out bytes.Buffer w := io.MultiWriter(&out, log.Writer()) cmd.Stdout = w cmd.Stderr = w err := cmd.Run() return err != nil } fu...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/utils/fs/fs.go
pkg/utils/fs/fs.go
package fs import ( "io/fs" "os" "strings" "github.com/bmatcuk/doublestar/v4" ) func ListFilesByGlob(glob string) ([]string, error) { var fsys fs.FS startWithRoot := false if strings.HasPrefix(glob, "/") { fsys = os.DirFS("/") startWithRoot = true glob = glob[1:] } else { fsys = os.DirFS(".") } mat...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/utils/bits/bits.go
pkg/utils/bits/bits.go
package bits type Bits uint8 func Set(b, flag Bits) Bits { return b | flag } func Clear(b, flag Bits) Bits { return b &^ flag } func Toggle(b, flag Bits) Bits { return b ^ flag } func Has(b, flag Bits) bool { return b&flag != 0 }
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/oraclert/stats.go
pkg/oraclert/stats.go
package oraclert import ( "sync" ) var ( getSelEfcmCount uint32 origSelCount uint32 notSelEfcmCount uint32 opRecords []uint16 opMutex sync.Mutex ) func recordOp(opID uint16) { opMutex.Lock() opRecords = append(opRecords, opID) opMutex.Unlock() }
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/oraclert/select.go
pkg/oraclert/select.go
package oraclert import ( "runtime" "sync/atomic" "time" ) // GetSelEfcmCaseIdx will be instrumented to each select in target program. func GetSelEfcmSwitchCaseIdx(filename string, origLine string, origCases int) int { atomic.AddUint32(&getSelEfcmCount, 1) runtime.StoreLastMySwitchSelectNumCase(origCases) runt...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/oraclert/record.go
pkg/oraclert/record.go
package oraclert import "runtime" func StoreOpInfo(strOpType string, uint16OpID uint16) { runtime.StoreChOpInfo(strOpType, uint16OpID) recordOp(uint16OpID) } func StoreChMakeInfo(ch interface{}, uint16OpID uint16) interface{} { runtime.StoreChOpInfo("ChMake", uint16OpID) runtime.LinkChToLastChanInfo(ch) recordO...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/oraclert/reflect.go
pkg/oraclert/reflect.go
package oraclert import ( "reflect" "runtime" ) func IsInterestingType(kind reflect.Kind) bool { switch kind { case reflect.Chan, reflect.Slice, reflect.Array, reflect.Map, reflect.Struct, reflect.Ptr: return true default: return false } } // TODO: shared struct updated in one goroutine; func CurrentGoAddV...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/oraclert/oracle.go
pkg/oraclert/oracle.go
package oraclert import ( "bufio" "fmt" "os" "runtime" "strconv" "strings" "sync" "sync/atomic" "time" ) const ( NotePrintInput string = "PrintInput" InputFileName string = "myinput.txt" RecordFileName = "myrecord.txt" OutputFileName = "myoutput.txt" ErrFileName = "myerror.txt" ...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/oraclert/output.go
pkg/oraclert/output.go
package oraclert import ( "fmt" "gfuzz/pkg/oraclert/config" "gfuzz/pkg/oraclert/output" "os" "runtime" "sort" "strings" ) // getChans returns all the channels touched during // runtime and their status/properties func getChans() map[string]output.ChanRecord { var chans map[string]output.ChanRecord = make(map[...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/oraclert/global.go
pkg/oraclert/global.go
package oraclert import ( "fmt" "gfuzz/pkg/oraclert/config" "gfuzz/pkg/oraclert/env" "gfuzz/pkg/selefcm" "io/ioutil" "os" "strconv" "time" ) var ( // oracle runtime configuration ortConfig *config.Config // select enforcement strategy efcmStrat selefcm.SelectCaseStrategy // timeout each select should wai...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/oraclert/env/env.go
pkg/oraclert/env/env.go
package env // All environment consumed by oracle runtime const ( // ORACLERT_CONFIG_FILE is an environment variable, set by fuzzer, // pass to oraclert, a filepath to oracle runtime configuration file. ORACLERT_CONFIG_FILE = "ORACLERT_CONFIG_FILE" // ORACLERT_DEBUG is an boolean environment variable ORACLERT_DE...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/oraclert/config/config.go
pkg/oraclert/config/config.go
package config import ( "encoding/json" "gfuzz/pkg/selefcm" ) // Config contains all information need to be passed to fuzz target (consumed by oracle runtime) type Config struct { // SelEfcm, select enforcement SelEfcm selefcm.SelEfcmConfig `json:"selefcm"` DumpSelects bool `json:"dump_selec...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false
system-pclub/GFuzz
https://github.com/system-pclub/GFuzz/blob/8c2d8855d6f35f5135582909420e994901180d79/pkg/oraclert/output/output.go
pkg/oraclert/output/output.go
package output import ( "encoding/json" ) type Output struct { Tuples map[uint32]uint32 `json:"tuple"` Channels map[string]ChanRecord `json:"channels"` Ops []uint16 `json:"ops"` Selects []SelectRecord `json:"selects"` } type ChanRecord struct { ID string `json:"id"` Clos...
go
MIT
8c2d8855d6f35f5135582909420e994901180d79
2026-01-07T09:45:45.369593Z
false