Skip to content

Commit

Permalink
remove libfuzzerInitializeCounters and fix counter incrementing code
Browse files Browse the repository at this point in the history
  • Loading branch information
kyakdan committed Mar 17, 2022
1 parent 3e0442f commit a039aba
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/cmd/compile/internal/typecheck/builtin.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/cmd/compile/internal/typecheck/builtin/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,6 @@ func libfuzzerTraceConstCmp2(uint16, uint16)
func libfuzzerTraceConstCmp4(uint32, uint32)
func libfuzzerTraceConstCmp8(uint64, uint64)

// This function should be called by the fuzz target on start to register the 8bit counters with libfuzzer
func libfuzzerInitializeCounters()

// architecture variants
var x86HasPOPCNT bool
var x86HasSSE41 bool
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/compile/internal/walk/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ func (o *orderState) edge() {
// Saturated Counters, however, decreases the overall performance.
o.append(ir.NewIfStmt(base.Pos,
ir.NewBinaryExpr(base.Pos, ir.OEQ, counter, ir.NewInt(0xff)),
[]ir.Node{ir.NewAssignOpStmt(base.Pos, ir.OADD, counter, ir.NewInt(1))},
[]ir.Node{ir.NewAssignStmt(base.Pos, counter, ir.NewInt(1))}))
[]ir.Node{ir.NewAssignStmt(base.Pos, counter, ir.NewInt(1))},
[]ir.Node{ir.NewAssignOpStmt(base.Pos, ir.OADD, counter, ir.NewInt(1))}))
}

// orderBlock orders the block of statements in n into a new slice,
Expand Down
1 change: 0 additions & 1 deletion src/cmd/internal/goobj/builtinlist.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a039aba

Please sign in to comment.