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

“panic: runtime error: index out of range” using a combination of null and splat #24805

Closed
izeau opened this issue Apr 29, 2020 · 2 comments · Fixed by #25216
Closed

“panic: runtime error: index out of range” using a combination of null and splat #24805

izeau opened this issue Apr 29, 2020 · 2 comments · Fixed by #25216
Labels
config confirmed a Terraform Core team member has reproduced this issue crash v0.12 Issues (primarily bugs) reported against v0.12 releases

Comments

@izeau
Copy link
Contributor

izeau commented Apr 29, 2020

Terraform Version

v0.12.24

Terraform Configuration Files

locals {
  x = concat([1, null]...)
}

Debug Output

https://gist.github.com/izeau/8be4f9671c27a2404eee74ca82a9a29c#file-trace-out

Crash Output

https://gist.github.com/izeau/8be4f9671c27a2404eee74ca82a9a29c#file-crash-log

Expected Behavior

I expected it to fail with an error, but not a panic. The generic one would have been nice:

Invalid value for "seqs" parameter: argument must not be null.

Actual Behavior

💥

Steps to Reproduce

$ terraform console <<< 'concat([1, null]...)'

Additional Context

References

@danieldreier danieldreier added config crash v0.12 Issues (primarily bugs) reported against v0.12 releases labels Apr 29, 2020
@danieldreier
Copy link
Contributor

@izeau thanks! I've reproduced this and am seeing the same behavior. Even a terraform validate on this causes the panic. We're pretty heads-down on 0.13 feature work right now, but are hoping to do a big clean-up of known panics and I'm hoping we can come back to this at that point.

@danieldreier danieldreier added the confirmed a Terraform Core team member has reproduced this issue label May 13, 2020
@ghost
Copy link

ghost commented Jul 12, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
config confirmed a Terraform Core team member has reproduced this issue crash v0.12 Issues (primarily bugs) reported against v0.12 releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants