Skip to content

LlamaBatch::get_one returns 'static ownership to borrowed data #714

@torkleyy

Description

@torkleyy

Implementation of LlamaBatch::get_one is unsound, the tokens are not copied but they are simply turned into a pointer. I think that also contradicts the comment on the field of the raw batch:

always initialize by `llama_cpp_sys_2::llama_batch_init

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedlibthings that effect the library itself🐛 bugsomething is broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions