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

Fix panic when version block has a comma in between versions #327

Open
kirillzh opened this issue Oct 21, 2022 · 1 comment
Open

Fix panic when version block has a comma in between versions #327

kirillzh opened this issue Oct 21, 2022 · 1 comment

Comments

@kirillzh
Copy link

kirillzh commented Oct 21, 2022

This was caused by this PR.

Searching or installing corretto package no longer works, running hermit search corretto errors this:

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x1c8 pc=0x100c679dc]

goroutine 1 [running]:
github.com/cashapp/hermit/app.Main.func3()
	/home/runner/work/hermit/hermit/app/main.go:149 +0x58
panic({0x100f49700, 0x101396500})
	/home/runner/.cache/hermit/pkg/go-1.19.1/src/runtime/panic.go:884 +0x204
github.com/cashapp/hermit/manifest.(*Resolver).Search(0x140003a3a90, {0x100fe6ec8, 0x1400015a200}, {0x14000423970?, 0x14000162700?})
	/home/runner/work/hermit/hermit/manifest/resolver.go:231 +0x17c
github.com/cashapp/hermit.(*Env).Search(0x140003fc140?, 0x0?, {0x14000423970, 0x8})
	/home/runner/work/hermit/hermit/env.go:1045 +0x48
github.com/cashapp/hermit/app.(*searchCmd).Run(0x14000394150, 0x1400015a200, 0x140003fc140, 0x1?)
	/home/runner/work/hermit/hermit/app/search_cmd.go:87 +0xb8
reflect.Value.call({0x100f3a880?, 0x14000394150?, 0x14000163178?}, {0x100de0cc6, 0x4}, {0x1400039ca80, 0x3, 0x100d7e1f0?})
	/home/runner/.cache/hermit/pkg/go-1.19.1/src/reflect/value.go:584 +0x688
reflect.Value.Call({0x100f3a880?, 0x14000394150?, 0x100f52400?}, {0x1400039ca80?, 0x1400042ee80?, 0x9?})
	/home/runner/.cache/hermit/pkg/go-1.19.1/src/reflect/value.go:368 +0x90
github.com/alecthomas/kong.callMethod({0x100de0558, 0x3}, {0x100f99c80?, 0x14000394150?, 0x3?}, {0x100f3a880?, 0x14000394150?, 0x1400047fbc0?}, 0x100fdf2a0?)
	/home/runner/go/pkg/mod/github.com/alecthomas/[email protected]/callbacks.go:97 +0x3e4
github.com/alecthomas/kong.(*Context).RunNode(0x140003fe180, 0x140003b6d20, {0x14000163990, 0x8, 0x8})
	/home/runner/go/pkg/mod/github.com/alecthomas/[email protected]/context.go:735 +0x460
github.com/alecthomas/kong.(*Context).Run(0x100fc2ec0?, {0x14000163990?, 0x5?, 0x5?})
	/home/runner/go/pkg/mod/github.com/alecthomas/[email protected]/context.go:760 +0x144
github.com/cashapp/hermit/app.Main({{0x1400002a480, 0x10}, 0x3, {0x140000283c0, 0x3a}, {0x1400001fa10, 0x3, 0x3}, {0x14000292000, 0x13, ...}, ...})
	/home/runner/work/hermit/hermit/app/main.go:279 +0x189c
main.main()
	/home/runner/work/hermit/hermit/cmd/hermit/main.go:28 +0x1cc

Searching and installing other packages works well. I am wondering if this is caused by a comma here? https://github.com/cashapp/hermit-packages/pull/225/files#r1001268100

@alecthomas
Copy link
Collaborator

This is fixed now - it was the spurious comma. I'm not sure why the parser didn't error, rather than just panicking. I'll have to look into that.

@alecthomas alecthomas transferred this issue from cashapp/hermit-packages Oct 21, 2022
@alecthomas alecthomas changed the title Unable to work with corretto package Fix panic when version block has a comma in between versions Oct 21, 2022
spicykay pushed a commit to spicykay/hermit that referenced this issue Aug 23, 2024
Released upstream by OpenJDK on 2023-04-18 [0], with the Eclipse Temurin
builds made available on 2023-04-19 [1]. This fixes seven CVEs reported
against OpenJDK 17.0.6 and earlier [2].

[0]: https://mail.openjdk.org/pipermail/jdk-updates-dev/2023-April/021899.html
[1]: https://github.com/adoptium/temurin17-binaries/releases/tag/jdk-17.0.7%2B7
[2]: https://openjdk.org/groups/vulnerability/advisories/2023-04-18
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