Skip to content

Conversation

@shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Oct 7, 2025

Fixes #195

Fixes apache#195

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@github-actions
Copy link

github-actions bot commented Oct 7, 2025

✅ Build complete for PR #196.

🔗 Download the cmk binaries (expires on October 17, 2025)

Copy link
Contributor

@hsato03 hsato03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I was able to reproduce the issue in the autocomplete of the id field in the listAccounts API.

Apache CloudStack 🐵 CloudMonkey 6.5.0
Report issues: https://github.com/apache/cloudstack-cloudmonkey/issues

panic: runtime error: slice bounds out of range [:30] with capacity 8

goroutine 35 [running]:
github.com/chzyer/readline.(*opCompleter).truncateBufferAfterLastEqual(0xc000191340, {0xc0015e6560, 0x7, 0x8})
	/home/shwstppr/lab/shapeblue/cloudstack-cloudmonkey/vendor/github.com/chzyer/readline/complete.go:54 +0x1e9
github.com/chzyer/readline.(*opCompleter).writeRunes(0xc000191340, {0xc0015e6540, 0x10000c0016ebc28?, 0x10})
	/home/shwstppr/lab/shapeblue/cloudstack-cloudmonkey/vendor/github.com/chzyer/readline/complete.go:70 +0x8d
github.com/chzyer/readline.(*opCompleter).OnComplete(0xc000191340)
	/home/shwstppr/lab/shapeblue/cloudstack-cloudmonkey/vendor/github.com/chzyer/readline/complete.go:125 +0x1b2
github.com/chzyer/readline.(*Operation).ioloop(0xc000191260)
	/home/shwstppr/lab/shapeblue/cloudstack-cloudmonkey/vendor/github.com/chzyer/readline/operation.go:180 +0xd0f
created by github.com/chzyer/readline.NewOperation in goroutine 1
	/home/shwstppr/lab/shapeblue/cloudstack-cloudmonkey/vendor/github.com/chzyer/readline/operation.go:88 +0x2c6

When attempting to reproduce the problem with the cmk binaries from PR, the panic no longer occurs.

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.

Autocomplete crashes cmk if at the end of uuid string

2 participants