Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: stackoverflow error when -d=libfuzzer is used with all=-N -l #54001

Closed
nd opened this issue Jul 22, 2022 · 7 comments
Closed

runtime: stackoverflow error when -d=libfuzzer is used with all=-N -l #54001

nd opened this issue Jul 22, 2022 · 7 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.

Comments

@nd
Copy link
Contributor

nd commented Jul 22, 2022

What version of Go are you using (go version)?

$ go version
go version go1.19rc2 windows/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
      1 [main] cc1 (11692) C:\msys64\usr\lib\gcc\x86_64-pc-msys\11.3.0\cc1.exe: *** fatal error - cygheap base mismatch detected - 0x18034B408/0x18034C408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
      0 [main] cc1 (1364) C:\msys64\usr\lib\gcc\x86_64-pc-msys\11.3.0\cc1.exe: *** fatal error - cygheap base mismatch detected - 0x18034B408/0x18034C408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
      0 [main] cc1 (11728) C:\msys64\usr\lib\gcc\x86_64-pc-msys\11.3.0\cc1.exe: *** fatal error - cygheap base mismatch detected - 0x18034B408/0x18034C408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\nd\AppData\Local\go-build
set GOENV=C:\Users\nd\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\nd\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\nd\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\Users\nd\go\go1.19rc2
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\Users\nd\go\go1.19rc2\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.19rc2
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\nd\AppData\Local\Temp\go-build2064143778=/tmp/go-build -gno-record-gcc-switches

What did you do?

Went through go fuzz tutorial: go.mod, main.go, main_test.go. Compiled the test:

go test -c -o test.exe -gcflags "all=-N -l -d=libfuzzer" gofuzztutorial

and ran it:

test.exe --test.fuzz ^\QFuzzReverse\E$ --test.fuzzcachedir=./fuzz

What did you expect to see?

Test runs

What did you see instead?

Stackoverflow error:

runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc0200f1388 stack=[0xc0200f0000, 0xc0400f0000]
fatal error: stack overflow

runtime stack:
runtime.throw({0x11ecab6?, 0x12ff6c0?})
        C:/Users/nd/go/go1.19rc2/src/runtime/panic.go:1047 +0x65 fp=0xd5b81ffb78 sp=0xd5b81ffb48 pc=0xe90965
runtime.newstack()
        C:/Users/nd/go/go1.19rc2/src/runtime/stack.go:1103 +0x61b fp=0xd5b81ffd28 sp=0xd5b81ffb78 pc=0xea865b
runtime.morestack()
        C:/Users/nd/go/go1.19rc2/src/runtime/asm_amd64.s:570 +0x93 fp=0xd5b81ffd30 sp=0xd5b81ffd28 pc=0xec0113

goroutine 1 [running, locked to thread]:
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/trace.go:29 +0x7a fp=0xc0200f1398 sp=0xc0200f1390 pc=0x112101a
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f13b8 sp=0xc0200f1398 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f13d8 sp=0xc0200f13b8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f13f8 sp=0xc0200f13d8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1418 sp=0xc0200f13f8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1438 sp=0xc0200f1418 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1458 sp=0xc0200f1438 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1478 sp=0xc0200f1458 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1498 sp=0xc0200f1478 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f14b8 sp=0xc0200f1498 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f14d8 sp=0xc0200f14b8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f14f8 sp=0xc0200f14d8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1518 sp=0xc0200f14f8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1538 sp=0xc0200f1518 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1558 sp=0xc0200f1538 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1578 sp=0xc0200f1558 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1598 sp=0xc0200f1578 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f15b8 sp=0xc0200f1598 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f15d8 sp=0xc0200f15b8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f15f8 sp=0xc0200f15d8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1618 sp=0xc0200f15f8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1638 sp=0xc0200f1618 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1658 sp=0xc0200f1638 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1678 sp=0xc0200f1658 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1698 sp=0xc0200f1678 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f16b8 sp=0xc0200f1698 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f16d8 sp=0xc0200f16b8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f16f8 sp=0xc0200f16d8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1718 sp=0xc0200f16f8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1738 sp=0xc0200f1718 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1758 sp=0xc0200f1738 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1778 sp=0xc0200f1758 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1798 sp=0xc0200f1778 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f17b8 sp=0xc0200f1798 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f17d8 sp=0xc0200f17b8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f17f8 sp=0xc0200f17d8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1818 sp=0xc0200f17f8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1838 sp=0xc0200f1818 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1858 sp=0xc0200f1838 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1878 sp=0xc0200f1858 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1898 sp=0xc0200f1878 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f18b8 sp=0xc0200f1898 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f18d8 sp=0xc0200f18b8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f18f8 sp=0xc0200f18d8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1918 sp=0xc0200f18f8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1938 sp=0xc0200f1918 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1958 sp=0xc0200f1938 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1978 sp=0xc0200f1958 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1998 sp=0xc0200f1978 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f19b8 sp=0xc0200f1998 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f19d8 sp=0xc0200f19b8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f19f8 sp=0xc0200f19d8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1a18 sp=0xc0200f19f8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1a38 sp=0xc0200f1a18 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1a58 sp=0xc0200f1a38 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1a78 sp=0xc0200f1a58 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1a98 sp=0xc0200f1a78 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1ab8 sp=0xc0200f1a98 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1ad8 sp=0xc0200f1ab8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1af8 sp=0xc0200f1ad8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1b18 sp=0xc0200f1af8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1b38 sp=0xc0200f1b18 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1b58 sp=0xc0200f1b38 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1b78 sp=0xc0200f1b58 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1b98 sp=0xc0200f1b78 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1bb8 sp=0xc0200f1b98 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1bd8 sp=0xc0200f1bb8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1bf8 sp=0xc0200f1bd8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1c18 sp=0xc0200f1bf8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1c38 sp=0xc0200f1c18 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1c58 sp=0xc0200f1c38 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1c78 sp=0xc0200f1c58 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1c98 sp=0xc0200f1c78 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1cb8 sp=0xc0200f1c98 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1cd8 sp=0xc0200f1cb8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1cf8 sp=0xc0200f1cd8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1d18 sp=0xc0200f1cf8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1d38 sp=0xc0200f1d18 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1d58 sp=0xc0200f1d38 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1d78 sp=0xc0200f1d58 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1d98 sp=0xc0200f1d78 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1db8 sp=0xc0200f1d98 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1dd8 sp=0xc0200f1db8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1df8 sp=0xc0200f1dd8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1e18 sp=0xc0200f1df8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1e38 sp=0xc0200f1e18 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1e58 sp=0xc0200f1e38 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1e78 sp=0xc0200f1e58 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1e98 sp=0xc0200f1e78 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1eb8 sp=0xc0200f1e98 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1ed8 sp=0xc0200f1eb8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1ef8 sp=0xc0200f1ed8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1f18 sp=0xc0200f1ef8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1f38 sp=0xc0200f1f18 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1f58 sp=0xc0200f1f38 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1f78 sp=0xc0200f1f58 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1f98 sp=0xc0200f1f78 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1fb8 sp=0xc0200f1f98 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1fd8 sp=0xc0200f1fb8 pc=0x1120fd7
runtime.libfuzzerTraceConstCmp1(0xff, 0x0, 0xcc790c1b)
        C:/Users/nd/go/go1.19rc2/src/internal/fuzz/sys_windows.go:151 +0x37 fp=0xc0200f1ff8 sp=0xc0200f1fd8 pc=0x1120fd7
...additional frames elided...

goroutine 2 [force gc (idle)]:
runtime.gopark(0x11fac68, 0x13174f0, 0x11, 0x14, 0x1)
        C:/Users/nd/go/go1.19rc2/src/runtime/proc.go:363 +0xfd fp=0xc000047f88 sp=0xc000047f58 pc=0xe933dd
runtime.goparkunlock(0x0?, 0x0?, 0x0?, 0x0?)
        C:/Users/nd/go/go1.19rc2/src/runtime/proc.go:369 +0x2a fp=0xc000047fb8 sp=0xc000047f88 pc=0xe9346a
runtime.forcegchelper()
        C:/Users/nd/go/go1.19rc2/src/runtime/proc.go:302 +0xa5 fp=0xc000047fe0 sp=0xc000047fb8 pc=0xe93205
runtime.goexit()
        C:/Users/nd/go/go1.19rc2/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000047fe8 sp=0xc000047fe0 pc=0xec2321
created by runtime.init.6
        C:/Users/nd/go/go1.19rc2/src/runtime/proc.go:290 +0x25

goroutine 3 [GC sweep wait]:
runtime.gopark(0x11fac68, 0x1317840, 0xc, 0x14, 0x1)
        C:/Users/nd/go/go1.19rc2/src/runtime/proc.go:363 +0xfd fp=0xc000049f68 sp=0xc000049f38 pc=0xe933dd
runtime.goparkunlock(0x0?, 0x0?, 0x0?, 0x0?)
        C:/Users/nd/go/go1.19rc2/src/runtime/proc.go:369 +0x2a fp=0xc000049f98 sp=0xc000049f68 pc=0xe9346a
runtime.bgsweep(0x0?)
        C:/Users/nd/go/go1.19rc2/src/runtime/mgcsweep.go:278 +0x98 fp=0xc000049fc8 sp=0xc000049f98 pc=0xe78e38
runtime.gcenable.func1()
        C:/Users/nd/go/go1.19rc2/src/runtime/mgc.go:178 +0x26 fp=0xc000049fe0 sp=0xc000049fc8 pc=0xe6d266
runtime.goexit()
        C:/Users/nd/go/go1.19rc2/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000049fe8 sp=0xc000049fe0 pc=0xec2321
created by runtime.gcenable
        C:/Users/nd/go/go1.19rc2/src/runtime/mgc.go:178 +0x6b

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x11fac68, 0x1317a00, 0xd, 0x14, 0x2)
        C:/Users/nd/go/go1.19rc2/src/runtime/proc.go:363 +0xfd fp=0xc000059f48 sp=0xc000059f18 pc=0xe933dd
runtime.goparkunlock(0x120e6f8?, 0x1?, 0x0?, 0x0?)
        C:/Users/nd/go/go1.19rc2/src/runtime/proc.go:369 +0x2a fp=0xc000059f78 sp=0xc000059f48 pc=0xe9346a
runtime.(*scavengerState).park(0x1317a00)
        C:/Users/nd/go/go1.19rc2/src/runtime/mgcscavenge.go:389 +0x4b fp=0xc000059fa0 sp=0xc000059f78 pc=0xe76acb
runtime.bgscavenge(0x0?)
        C:/Users/nd/go/go1.19rc2/src/runtime/mgcscavenge.go:617 +0x45 fp=0xc000059fc8 sp=0xc000059fa0 pc=0xe770a5
runtime.gcenable.func2()
        C:/Users/nd/go/go1.19rc2/src/runtime/mgc.go:179 +0x26 fp=0xc000059fe0 sp=0xc000059fc8 pc=0xe6d206
runtime.goexit()
        C:/Users/nd/go/go1.19rc2/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000059fe8 sp=0xc000059fe0 pc=0xec2321
created by runtime.gcenable
        C:/Users/nd/go/go1.19rc2/src/runtime/mgc.go:179 +0xaa
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 22, 2022
@randall77
Copy link
Contributor

randall77 commented Jul 22, 2022

@kyakdan

@kyakdan
Copy link
Contributor

kyakdan commented Jul 25, 2022

@randall77 I'll have a look

@cherrymui
Copy link
Member

cherrymui commented Jul 25, 2022

go test -c -o test.exe -gcflags "all=-N -l -d=libfuzzer" gofuzztutorial

Could you do go test -c -fuzz=. -gcflags=all="-N -l" instead? I don't think you want to pass -d=libfuzzer directly. For fuzzing, the go command specifically skips instrumentation (i.e. -d=libfuzzer) for a set of internal packages including runtime and internal/fuzz.

Thanks.

@cherrymui cherrymui closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2022
@nd
Copy link
Contributor Author

nd commented Jul 26, 2022

@cherrymui the -fuzz flag is described neither in go help test nor in go help build. What the -fuzz=. mean? What can I specify instead of .?

@aarzilli
Copy link
Contributor

aarzilli commented Jul 26, 2022

go help testflag:

        -fuzz regexp
            Run the fuzz test matching the regular expression. When specified,
            the command line argument must match exactly one package within the
            main module, and regexp must match exactly one fuzz test within
            that package. Fuzzing will occur after tests, benchmarks, seed corpora
            of other fuzz tests, and examples have completed. See the Fuzzing
            section of the testing package documentation for details.

@nd
Copy link
Contributor Author

nd commented Jul 27, 2022

I thought it is for fuzz test run. So one should specify the same -fuzz regexp both for compilation and during execution?

@cherrymui
Copy link
Member

cherrymui commented Jul 27, 2022

It is generally for specifying the fuzz test for running.

For compilation (go test -c), as fuzzing needs a different compilation mode you need to tell the go command at compile time, so you need to specify -fuzz. The target doesn't actually matter. You can specify anything after -fuzz for go test -c. (Due to the syntax of the flag, it has to be something there.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
Status: Done
Development

No branches or pull requests

6 participants