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

SIGSEGV when doing concat("a", "f") #105

Open
sixcorners opened this issue Nov 29, 2024 · 1 comment
Open

SIGSEGV when doing concat("a", "f") #105

sixcorners opened this issue Nov 29, 2024 · 1 comment

Comments

@sixcorners
Copy link

I don't really know what I'm doing. I'm using xq from ubuntu.

$ xq --version
xq version 0.0.0 (unknown, 000000)
$ echo | xq -x 'concat("a", "f")'
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x54e61e]

goroutine 6 [running]:
github.com/antchfx/xpath.(*functionQuery).Clone(0xc0000122b8)
	github.com/antchfx/xpath/query.go:611 +0x1e
github.com/antchfx/xpath.(*Expr).Select(...)
	github.com/antchfx/xpath/xpath.go:130
github.com/antchfx/xmlquery.QuerySelectorAll(0xc000036a00, 0xc00007ea60)
	github.com/antchfx/xmlquery/query.go:114 +0x85
github.com/antchfx/xmlquery.QueryAll(0xc000036a00, {0x7ffc0cbf9190?, 0x0?})
	github.com/antchfx/xmlquery/query.go:98 +0x4a
github.com/antchfx/xmlquery.Find(...)
	github.com/antchfx/xmlquery/query.go:74
github.com/sibprogrammer/xq/internal/utils.XPathQuery({0x8408e0?, 0xc00006a050?}, {0x8409a0, 0xc000092360}, {0x7ffc0cbf9190, 0x10}, 0x0)
	github.com/sibprogrammer/xq/internal/utils/utils.go:157 +0xff
github.com/sibprogrammer/xq/cmd.init.func1.1()
	github.com/sibprogrammer/xq/cmd/root.go:53 +0xa5
created by github.com/sibprogrammer/xq/cmd.init.func1 in goroutine 1
	github.com/sibprogrammer/xq/cmd/root.go:49 +0x2a7

This command reproduces it but I gave it real xml when I first found this.

@zhengchun
Copy link
Contributor

please provides your example and test sample data.

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