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

Memory error when defining custom help command #18728

Closed
Dialga opened this issue Jul 1, 2023 · 0 comments · Fixed by #18732
Closed

Memory error when defining custom help command #18728

Dialga opened this issue Jul 1, 2023 · 0 comments · Fixed by #18732
Labels
Bug This tag is applied to issues which reports bugs. Unit: vlib Bugs/feature requests, that are related to the vlib.

Comments

@Dialga
Copy link
Member

Dialga commented Jul 1, 2023

Describe the bug

A runtime memory error occurs when defining a custom help command.

Expected Behavior

No memory error.

Current Behavior

$ v run issue.v
RUNTIME ERROR: invalid memory access

Reproduction Steps

import cli { Command, Flag }
fn main() {
        mut cmd := Command{
                name: 'help'
                commands: [
                        Command{
                                name: 'help'
                        }
                ]
        }
        cmd.parse([''])
}

Possible Solution

No response

Additional Information/Context

No response

V version

latest git

Environment details (OS name and version, etc.)

Arch Linux x64

@Dialga Dialga added the Bug This tag is applied to issues which reports bugs. label Jul 1, 2023
@felipensp felipensp added the Unit: vlib Bugs/feature requests, that are related to the vlib. label Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs. Unit: vlib Bugs/feature requests, that are related to the vlib.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants