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

evalv3: index out of range panic in overlayContext.allocCC #3597

Open
mvdan opened this issue Nov 27, 2024 · 0 comments
Open

evalv3: index out of range panic in overlayContext.allocCC #3597

mvdan opened this issue Nov 27, 2024 · 0 comments
Labels
evaluator evalv3 issues affecting only the evaluator version 3 panic

Comments

@mvdan
Copy link
Member

mvdan commented Nov 27, 2024

# With the old evaluator.
env CUE_EXPERIMENT=evalv3=0
exec cue vet -c=false

# With the new evaluator.
env CUE_EXPERIMENT=evalv3=1
exec cue vet -c=false

-- input.cue --
package p

#Schema: {
	_ok: bool
	{} | {
		_ok: true
		let Ok = _ok
		{} | {x: Ok}
	}
}

[string]: #Schema

foo: bar
bar: {}

As of c29fd02:

# With the old evaluator. (0.010s)
> env CUE_EXPERIMENT=evalv3=0
> exec cue vet -c=false
# With the new evaluator. (0.035s)
> env CUE_EXPERIMENT=evalv3=1
> exec cue vet -c=false
[stderr]
panic: runtime error: index out of range [1] with length 1 [recovered]
	panic: runtime error: index out of range [1] with length 1 [recovered]
	panic: runtime error: index out of range [1] with length 1

goroutine 1 gp=0xc000002380 m=0 mp=0x19dde00 [running]:
panic({0x1073420?, 0xc00003a180?})
	/home/mvdan/tip/src/runtime/panic.go:806 +0x168 fp=0xc000404890 sp=0xc0004047e0 pc=0x472b68
cuelang.org/go/internal/core/adt.runTask.func1()
	/home/mvdan/src/c/cue/internal/core/adt/sched.go:695 +0x76 fp=0xc0004048b8 sp=0xc000404890 pc=0x739c96
panic({0x1073420?, 0xc00003a180?})
	/home/mvdan/tip/src/runtime/panic.go:787 +0x132 fp=0xc000404968 sp=0xc0004048b8 pc=0x472b32
cuelang.org/go/internal/core/adt.runTask.func1()
	/home/mvdan/src/c/cue/internal/core/adt/sched.go:695 +0x76 fp=0xc000404990 sp=0xc000404968 pc=0x739c96
panic({0x1073420?, 0xc00003a180?})
	/home/mvdan/tip/src/runtime/panic.go:787 +0x132 fp=0xc000404a40 sp=0xc000404990 pc=0x472b32
runtime.goPanicIndex(0x1, 0x1)
	/home/mvdan/tip/src/runtime/panic.go:115 +0x74 fp=0xc000404a80 sp=0xc000404a40 pc=0x4383f4
cuelang.org/go/internal/core/adt.(*overlayContext).allocCC(0xc0004055d0, 0xc0018ba800)
	/home/mvdan/src/c/cue/internal/core/adt/overlay.go:286 +0x5f6 fp=0xc000404b98 sp=0xc000404a80 pc=0x737476
cuelang.org/go/internal/core/adt.(*overlayContext).allocCC(0xc0004055d0, 0xc0018ba900)
	/home/mvdan/src/c/cue/internal/core/adt/overlay.go:271 +0xbe fp=0xc000404cb0 sp=0xc000404b98 pc=0x736f3e
cuelang.org/go/internal/core/adt.(*overlayContext).allocCC(0xc0004055d0, 0xc0018baa00)
	/home/mvdan/src/c/cue/internal/core/adt/overlay.go:271 +0xbe fp=0xc000404dc8 sp=0xc000404cb0 pc=0x736f3e
cuelang.org/go/internal/core/adt.(*overlayContext).allocCC(0xc0004055d0, 0xc0018bab00)
	/home/mvdan/src/c/cue/internal/core/adt/overlay.go:271 +0xbe fp=0xc000404ee0 sp=0xc000404dc8 pc=0x736f3e
[...]

Reduced from https://github.com/vectordotdev/vector in Unity.

@mvdan mvdan added the evalv3 issues affecting only the evaluator version 3 label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evaluator evalv3 issues affecting only the evaluator version 3 panic
Projects
None yet
Development

No branches or pull requests

1 participant