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

ExtractPointer空指针解析错误 #228

Closed
aide-cloud opened this issue Jul 17, 2024 · 1 comment
Closed

ExtractPointer空指针解析错误 #228

aide-cloud opened this issue Jul 17, 2024 · 1 comment

Comments

@aide-cloud
Copy link
Contributor

// You can edit this code!
// Click here and start typing.
package main

import (
	"fmt"

	"github.com/duke-git/lancet/v2/pointer"
)

func main() {
	result := pointer.ExtractPointer(nil)

	fmt.Println(result)

	// Output:
	// 1
}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x98 pc=0x4804aa]

goroutine 1 [running]:
github.com/duke-git/lancet/v2/pointer.ExtractPointer({0x0, 0x0})
	/tmp/gopath3492907256/pkg/mod/github.com/duke-git/lancet/v2@v2.3.1/pointer/pointer.go:49 +0xaa
main.main()
	/tmp/sandbox2823197783/prog.go:13 +0x17
@duke-git
Copy link
Owner

v2.3.2版本已修复

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

2 participants