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 crash when passed --only with a configured rule #1106

Merged
merged 1 commit into from
Apr 25, 2021

Conversation

wata727
Copy link
Member

@wata727 wata727 commented Apr 24, 2021

Similar to #1105, it is crashed when passed --only with a configured rule.

% tflint --only aws_s3_bucket_name
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x186a197]

goroutine 38 [running]:
github.com/terraform-linters/tflint/tflint.(*RuleConfig).Bytes(...)
        /Users/watanabekazuma/workspace/golang/src/github.com/wata727/tflint/tflint/config.go:430
github.com/terraform-linters/tflint/plugin.(*Server).RuleConfig(0xc00014de30, 0xc00017d7b0, 0xc0006ece70, 0x0, 0x0)
        /Users/watanabekazuma/workspace/golang/src/github.com/wata727/tflint/plugin/server.go:167 +0x1b7
reflect.Value.call(0xc0007056e0, 0xc00015cc80, 0x13, 0x2735c99, 0x4, 0xc000613f08, 0x3, 0x3, 0x26cf760, 0xc0004ac000, ...)
        /usr/local/Cellar/go/1.16/libexec/src/reflect/value.go:476 +0x8e7
reflect.Value.Call(0xc0007056e0, 0xc00015cc80, 0x13, 0xc000124708, 0x3, 0x3, 0x2a2d660, 0x100010000, 0xc00068d040)
        /usr/local/Cellar/go/1.16/libexec/src/reflect/value.go:337 +0xb9
net/rpc.(*service).call(0xc000702dc0, 0xc000701c70, 0xc0001406e0, 0xc0001406f0, 0xc000158780, 0xc0000509e0, 0x2213760, 0xc0
0017d7b0, 0x16, 0x22137a0, ...)
        /usr/local/Cellar/go/1.16/libexec/src/net/rpc/server.go:377 +0x189
created by net/rpc.(*Server).ServeCodec
        /usr/local/Cellar/go/1.16/libexec/src/net/rpc/server.go:474 +0x44d

@wata727 wata727 merged commit ca3e503 into master Apr 25, 2021
@wata727 wata727 deleted the fix_crash_when_passed_only_flag branch April 25, 2021 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant