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

Crash with STATUS_STACK_BUFFER_OVERRUN on nil pointer dereference (windows) #30319

Closed
0xd34d10cc opened this issue Feb 19, 2019 · 2 comments
Closed

Comments

@0xd34d10cc
Copy link

0xd34d10cc commented Feb 19, 2019

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

$ go version
go version go1.11.5 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
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\d34d10cc\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\development\gopath
set GOPROXY=
set GORACE=
set GOROOT=D:\development\go
set GOTMPDIR=
set GOTOOLDIR=D:\development\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\d34d10cc\AppData\Local\Temp\go-build060979054=/tmp/go-build -gno-record-gcc-switches

What did you do?

I ran this program:

package main

import "log"
import "os"


func main() {
        type Point struct {
                x int
                y int
        }

        var p *Point = nil

        l := log.New(os.Stderr, "", 0)
        l.Println("log msg")

        log.Printf("%v", p.x)
}

with go run main.go command

What did you expect to see?

Panic message

What did you see instead?

$ go run ./main.go
log msg
exit status 3221226505
@0xd34d10cc 0xd34d10cc changed the title Crash with STATUS_STACK_BUFFER_OVERRUN on nil pointer dereference Crash with STATUS_STACK_BUFFER_OVERRUN on nil pointer dereference (windows) Feb 19, 2019
@0xd34d10cc
Copy link
Author

Disabling CFG (control flow graph) in windows defender settings "resolves" this problem. Not sure where the bug is - in windows defender or in go, or if "bug" even exist. Feel free to close this issue.

@ianlancetaylor
Copy link
Contributor

Thanks for following up. Closing.

@golang golang locked and limited conversation to collaborators Feb 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants