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

会出现panic #28

Open
84970000 opened this issue Nov 6, 2019 · 0 comments
Open

会出现panic #28

84970000 opened this issue Nov 6, 2019 · 0 comments

Comments

@84970000
Copy link

84970000 commented Nov 6, 2019

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x7a8bf8]

goroutine 7 [running]:
github.com/40t/go-sniffer/plugSrc/mysql/build.(*stream).resolveClientPacket(0xc420056c80, 0xc42062e600, 0x1, 0x600, 0x1)
/data/home/xxx/Gosrc/src/github.com/40t/go-sniffer/plugSrc/mysql/build/entry.go:304 +0xd98
github.com/40t/go-sniffer/plugSrc/mysql/build.(*stream).resolve(0xc420056c80)
/data/home/xxx/Gosrc/src/github.com/40t/go-sniffer/plugSrc/mysql/build/entry.go:193 +0x95
created by github.com/40t/go-sniffer/plugSrc/mysql/build.(*Mysql).ResolveStream
/data/home/xxx/Gosrc/src/github.com/40t/go-sniffer/plugSrc/mysql/build/entry.go:71 +0x3ff

看代码,应该是没有判断从map取出来的是否为空指针,就直接给字段赋值,导致空指针错误了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant