]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
ggml: handle ggml_init failure to fix NULL pointer deref (llama/8692)
authorDavidKorczynski <redacted>
Thu, 25 Jul 2024 21:23:05 +0000 (22:23 +0100)
committerGeorgi Gerganov <redacted>
Sat, 27 Jul 2024 15:26:12 +0000 (18:26 +0300)
commit482abf92174d9748dcd23ab1932ae778a45651f6
treeb34541818f7aa7a09c8f327596960e49507f8cf9
parent74469da615b05ad6937101503de1287ab7c48735
ggml: handle ggml_init failure to fix NULL pointer deref (llama/8692)

`ggml_init` can fail if no unused context is found. In that case, a NULL-pointer deref will happen later in the code during a call to `ggml_set_on_alloc`.

This fixes it by bailing out if no context is found.
src/ggml.c