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: avoid possible nil logger when calculating block name #2542

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

tim775
Copy link
Member

@tim775 tim775 commented Jul 5, 2023

From sentry:

runtime error: invalid memory address or nil pointer dereference
"stacktrace": 
"1: running [Created by terraform.(*HCLProvider).Modules @ hcl_provider.go:339]
   :24                                                             Stack()
   :289                                                            (*Parser).ParseDirectory.func1()
   :884                                                            panic()
   :126                                                            (*Entry).WithFields()
   :121                                                            (*Entry).WithField()
   :107                                                            (*Entry).WithError()
   :980                                                            (*Block).Reference()
   :991                                                            (*Block).LocalName()
   :1015                                                           (*Block).FullName()
   :628                                                            (*Block).setLogger()
   :303                                                            BlockBuilder.NewBlock()
   :284                                                            BlockBuilder.NewBlock()
   :284                                                            BlockBuilder.NewBlock()

@tim775 tim775 requested a review from hugorut July 5, 2023 02:34
@tim775 tim775 self-assigned this Jul 5, 2023
@hugorut hugorut merged commit d8726b2 into master Jul 5, 2023
10 checks passed
@hugorut hugorut deleted the fix/nil_block_logger branch July 5, 2023 07:49
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

Successfully merging this pull request may close these issues.

None yet

2 participants