pingcap / pingcap/tidb

plan to submit a fuzz driver to OSS-Fuzz

Open
#47,053 0 comments 0 reactions 0 assignees View on GitHub
type/feature-request
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

We are developing a new technique to automatically transform your official unit tests into fuzz drivers. And our auto-generated fuzz driver successfully found your project's bug #39020 . Now we plan to submit this fuzz driver to [OSS-Fuzz Project](https://github.com/google/oss-fuzz). We hope to obtain your approval. Thanks a lot.

The fuzz driver's source code is followed. We are appreciated if you could provide us with some suggestions to improve our fuzz driver's quality.

```go
package membuf

import (
"testing"
)

func FuzzTestBufferIsolation(f *testing.F) {
f.Add(1024, 16, 16)
f.Fuzz(func(t *testing.T, data1 int, data2 int, data3 int) {
pool := NewPool(WithBlockSize(data1))
defer pool.Destroy()
bytesBuf := pool.NewBuffer()
defer bytesBuf.Destroy()

bytesBuf.AllocBytes(data2)
bytesBuf.AllocBytes(data3)
})
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.