Skip to content

Truncated model files can cause llama.cpp to crash when using mmap #6774

Closed
@slaren

Description

@slaren

llama_model_loader does not check if the tensor data is present in the file when using mmap, and in some cases this can cause llama.cpp to crash.

To fix this, llama_model_loader should check that all the tensor data is within the bounds of the file, and otherwise stop the process and notify the user that the model file is corrupted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions