Skip to content

Commit a039aba

Browse files
committed
remove libfuzzerInitializeCounters and fix counter incrementing code
1 parent 3e0442f commit a039aba

File tree

4 files changed

+2
-7
lines changed

4 files changed

+2
-7
lines changed

src/cmd/compile/internal/typecheck/builtin.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmd/compile/internal/typecheck/builtin/runtime.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,6 @@ func libfuzzerTraceConstCmp2(uint16, uint16)
266266
func libfuzzerTraceConstCmp4(uint32, uint32)
267267
func libfuzzerTraceConstCmp8(uint64, uint64)
268268

269-
// This function should be called by the fuzz target on start to register the 8bit counters with libfuzzer
270-
func libfuzzerInitializeCounters()
271-
272269
// architecture variants
273270
var x86HasPOPCNT bool
274271
var x86HasSSE41 bool

src/cmd/compile/internal/walk/order.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,8 @@ func (o *orderState) edge() {
464464
// Saturated Counters, however, decreases the overall performance.
465465
o.append(ir.NewIfStmt(base.Pos,
466466
ir.NewBinaryExpr(base.Pos, ir.OEQ, counter, ir.NewInt(0xff)),
467-
[]ir.Node{ir.NewAssignOpStmt(base.Pos, ir.OADD, counter, ir.NewInt(1))},
468-
[]ir.Node{ir.NewAssignStmt(base.Pos, counter, ir.NewInt(1))}))
467+
[]ir.Node{ir.NewAssignStmt(base.Pos, counter, ir.NewInt(1))},
468+
[]ir.Node{ir.NewAssignOpStmt(base.Pos, ir.OADD, counter, ir.NewInt(1))}))
469469
}
470470

471471
// orderBlock orders the block of statements in n into a new slice,

src/cmd/internal/goobj/builtinlist.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)