This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
Closed
Description
What version of CUE are you using (cue version
)?
$ cue version v0.3.0-alpha2
Does this issue reproduce with the latest release?
Yes
What did you do?
Ran cue def
on the following: https://gist.github.com/myitcv/42c4768f01d1845fe9415166373b15b6
What did you expect to see?
Success (and the regular output of cue def
), as I do with v0.2.2
What did you see instead?
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=0x1 addr=0x0 pc=0x618985]
goroutine 1 [running]:
cuelang.org/go/cmd/cue/cmd.recoverError(0xc00082fec0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/cmd/cue/cmd/root.go:221 +0x95
panic(0xbbff80, 0x1190e40)
/home/myitcv/gos/src/runtime/panic.go:969 +0x175
cuelang.org/go/cue/ast.(*Ident).Pos(0x0, 0xd88980, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/cue/ast/ast.go:756 +0x5
cuelang.org/go/internal/core/adt.pos(0xd79980, 0xc0000aed58, 0xc000518bd0, 0x165a4)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/adt/context.go:603 +0x65
cuelang.org/go/internal/core/adt.(*OpContext).NewPosf(0xc000198e00, 0x0, 0x0, 0xc9412a, 0x16, 0xc0007c3aa0, 0x1, 0x1, 0xc0007c3aa0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/adt/errors.go:240 +0xfa
cuelang.org/go/internal/core/adt.(*OpContext).Newf(0xc000198e00, 0xc9412a, 0x16, 0xc0007c3aa0, 0x1, 0x1, 0xc0003ae770)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/adt/errors.go:232 +0x89
cuelang.org/go/internal/core/adt.(*OpContext).NewErrf(...)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/adt/context.go:253
cuelang.org/go/internal/core/eval.(*acceptor).verifyArc(0xc0006a87c0, 0xc000198e00, 0xca0, 0xc0002d1cb0, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/closed.go:416 +0x38f
cuelang.org/go/internal/core/eval.(*Evaluator).evalVertex(0xc000206f30, 0xc000198e00, 0xc0002d1cb0, 0xc000580004, 0x0, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:333 +0x86b
cuelang.org/go/internal/core/eval.(*Evaluator).UnifyAccept(0xc000206f30, 0xc000198e00, 0xc0002d1cb0, 0xc0006a8904, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:265 +0x88
cuelang.org/go/internal/core/eval.(*Evaluator).Unify(0xc000206f30, 0xc000198e00, 0xc0002d1cb0, 0xc000206a04)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:239 +0x50
cuelang.org/go/internal/core/eval.(*nodeContext).postDisjunct(0xc0002db600)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:587 +0x1e9
cuelang.org/go/internal/core/eval.(*nodeContext).updateResult(0xc0002db600, 0xc0000aeb01)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/disjunct.go:130 +0x32
cuelang.org/go/internal/core/eval.(*nodeContext).tryDisjuncts(0xc0002db600, 0xc00029abe0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/disjunct.go:197 +0x16b
cuelang.org/go/internal/core/eval.(*Evaluator).evalVertex(0xc000206f30, 0xc000198e00, 0xc0003d9dd0, 0xc000580004, 0x0, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:431 +0x2d1
cuelang.org/go/internal/core/eval.(*Evaluator).UnifyAccept(0xc000206f30, 0xc000198e00, 0xc0003d9dd0, 0xc00018dc04, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:265 +0x88
cuelang.org/go/internal/core/eval.(*Evaluator).Unify(0xc000206f30, 0xc000198e00, 0xc0003d9dd0, 0xc0003d7304)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:239 +0x50
cuelang.org/go/internal/core/eval.(*nodeContext).postDisjunct(0xc0002da160)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:587 +0x1e9
cuelang.org/go/internal/core/eval.(*nodeContext).updateResult(0xc0002da160, 0xc000203901)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/disjunct.go:130 +0x32
cuelang.org/go/internal/core/eval.(*nodeContext).tryDisjuncts(0xc0002da160, 0xc000736050)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/disjunct.go:197 +0x16b
cuelang.org/go/internal/core/eval.(*Evaluator).evalVertex(0xc000206f30, 0xc000198e00, 0xc0003d81b0, 0xc000700004, 0x0, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:431 +0x2d1
cuelang.org/go/internal/core/eval.(*Evaluator).UnifyAccept(0xc000206f30, 0xc000198e00, 0xc0003d81b0, 0x6cf504, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:265 +0x88
cuelang.org/go/internal/core/eval.(*Evaluator).Unify(0xc000206f30, 0xc000198e00, 0xc0003d81b0, 0xc0003d7504)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:239 +0x50
cuelang.org/go/internal/core/eval.(*nodeContext).postDisjunct(0xc0003da000)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:587 +0x1e9
cuelang.org/go/internal/core/eval.(*nodeContext).updateResult(0xc0003da000, 0xc0003d7501)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/disjunct.go:130 +0x32
cuelang.org/go/internal/core/eval.(*nodeContext).tryDisjuncts(0xc0003da000, 0xc000736900)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/disjunct.go:197 +0x16b
cuelang.org/go/internal/core/eval.(*Evaluator).evalVertex(0xc000206f30, 0xc000198e00, 0xc0003d8120, 0xc000066804, 0x0, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:431 +0x2d1
cuelang.org/go/internal/core/eval.(*Evaluator).UnifyAccept(0xc000206f30, 0xc000198e00, 0xc0003d8120, 0x6cf504, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:265 +0x88
cuelang.org/go/internal/core/eval.(*Evaluator).Unify(0xc000206f30, 0xc000198e00, 0xc0003d8120, 0xc000206e04)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:239 +0x50
cuelang.org/go/internal/core/eval.(*nodeContext).postDisjunct(0xc0003cfe40)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:587 +0x1e9
cuelang.org/go/internal/core/eval.(*nodeContext).updateResult(0xc0003cfe40, 0xc000206e01)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/disjunct.go:130 +0x32
cuelang.org/go/internal/core/eval.(*nodeContext).tryDisjuncts(0xc0003cfe40, 0xc0003b3400)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/disjunct.go:197 +0x16b
cuelang.org/go/internal/core/eval.(*Evaluator).evalVertex(0xc000206f30, 0xc000198e00, 0xc0000fcc60, 0xc000066804, 0x0, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:431 +0x2d1
cuelang.org/go/internal/core/eval.(*Evaluator).UnifyAccept(0xc000206f30, 0xc000198e00, 0xc0000fcc60, 0x6cf504, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:265 +0x88
cuelang.org/go/internal/core/eval.(*Evaluator).Unify(0xc000206f30, 0xc000198e00, 0xc0000fcc60, 0xc0003d7904)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:239 +0x50
cuelang.org/go/internal/core/eval.(*nodeContext).postDisjunct(0xc00015fe40)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:587 +0x1e9
cuelang.org/go/internal/core/eval.(*nodeContext).updateResult(0xc00015fe40, 0xc00015fe01)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/disjunct.go:130 +0x32
cuelang.org/go/internal/core/eval.(*nodeContext).tryDisjuncts(0xc00015fe40, 0xc000733d00)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/disjunct.go:197 +0x16b
cuelang.org/go/internal/core/eval.(*Evaluator).evalVertex(0xc000206f30, 0xc000198e00, 0xc0003c1440, 0xc000508004, 0x0, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:431 +0x2d1
cuelang.org/go/internal/core/eval.(*Evaluator).UnifyAccept(0xc000206f30, 0xc000198e00, 0xc0003c1440, 0x6cf504, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:265 +0x88
cuelang.org/go/internal/core/eval.(*Evaluator).Unify(0xc000206f30, 0xc000198e00, 0xc0003c1440, 0xc0003d6f04)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:239 +0x50
cuelang.org/go/internal/core/eval.(*nodeContext).postDisjunct(0xc0002da9a0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:587 +0x1e9
cuelang.org/go/internal/core/eval.(*nodeContext).updateResult(0xc0002da9a0, 0xc0003d6f01)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/disjunct.go:130 +0x32
cuelang.org/go/internal/core/eval.(*nodeContext).tryDisjuncts(0xc0002da9a0, 0xc000733d00)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/disjunct.go:197 +0x16b
cuelang.org/go/internal/core/eval.(*Evaluator).evalVertex(0xc000206f30, 0xc000198e00, 0xc0003c0510, 0xc55f04, 0x0, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:431 +0x2d1
cuelang.org/go/internal/core/eval.(*Evaluator).UnifyAccept(0xc000206f30, 0xc000198e00, 0xc0003c0510, 0xc0002d7204, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:265 +0x88
cuelang.org/go/internal/core/eval.(*Evaluator).Unify(0xc000206f30, 0xc000198e00, 0xc0003c0510, 0xc000198e04)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/eval/eval.go:239 +0x50
cuelang.org/go/internal/core/adt.(*Vertex).Finalize(0xc0003c0510, 0xc000198e00)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/internal/core/adt/composite.go:320 +0x51
cuelang.org/go/cue.(*Instance).Value(0xc000481a00, 0x6, 0xc000443d80)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/cue/instance.go:204 +0x52
cuelang.org/go/cmd/cue/cmd.buildInstances(0xc000443d80, 0xc000437e48, 0x1, 0x1, 0xc0005a0d80, 0xc0005a0d70, 0xc0005a0d60)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/cmd/cue/cmd/common.go:552 +0x131
cuelang.org/go/cmd/cue/cmd.(*buildPlan).instances(0xc000478000, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/cmd/cue/cmd/common.go:156 +0x58
cuelang.org/go/cmd/cue/cmd.runDef(0xc000443d80, 0x11e43f8, 0x0, 0x0, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/cmd/cue/cmd/def.go:60 +0x129
cuelang.org/go/cmd/cue/cmd.mkRunE.func1(0xc0000d5b80, 0x11e43f8, 0x0, 0x0, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/cmd/cue/cmd/root.go:46 +0x6c
github.com/spf13/cobra.(*Command).execute(0xc0000d5b80, 0x11e43f8, 0x0, 0x0, 0xc0000d5b80, 0x11e43f8)
/home/myitcv/gostuff/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x47c
github.com/spf13/cobra.(*Command).ExecuteC(0xc0000d5080, 0x0, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
/home/myitcv/gostuff/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
cuelang.org/go/cmd/cue/cmd.(*Command).Run(0xc000443d80, 0xd846e0, 0xc000034128, 0x0, 0x0)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/cmd/cue/cmd/root.go:206 +0x65
cuelang.org/go/cmd/cue/cmd.mainErr(0xd846e0, 0xc000034128, 0xc00000e070, 0x1, 0x1, 0xcc8640, 0xc0002b7f48)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/cmd/cue/cmd/root.go:145 +0x8a
cuelang.org/go/cmd/cue/cmd.Main(0xc00007e058)
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/cmd/cue/cmd/root.go:127 +0x9c
main.main()
/home/myitcv/gostuff/pkg/mod/cuelang.org/go@v0.3.0-alpha2/cmd/cue/main.go:24 +0x25
exit status 2