Skip to content

unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null in ::get_elements #26

@anatawa12

Description

@anatawa12

According to https://linux.die.net/man/3/tcl_listobjgetelements

If the list is empty, 0 is stored at objcPtr and NULL at objvPtr

Therefore, we need to use dangling pointer for data pointer of slice::from_raw_parts but it doesn't

slice::from_raw_parts( objv, objc as usize )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions