Commit bced4595b for llama.cpp
commit bced4595b87ff6355f86467a12e62bd2dc71573e
Author: Georgi Gerganov <ggerganov@gmail.com>
Date: Thu Sep 24 22:44:05 2026 +0300
sync : ggml (#29396)
* ggml : bump version to 0.25.2 (ggml/1642)
* ggml : fix ubsan error in `ggml_graph_nbytes` (ggml/1644)
* ggml : bump version to 0.25.3 (ggml/1645)
* sync : ggml
diff --git a/ggml/CMakeLists.txt b/ggml/CMakeLists.txt
index 1df78fddf..752dabbb6 100644
--- a/ggml/CMakeLists.txt
+++ b/ggml/CMakeLists.txt
@@ -5,7 +5,7 @@ project("ggml" C CXX ASM)
### GGML Version
set(GGML_VERSION_MAJOR 0)
set(GGML_VERSION_MINOR 25)
-set(GGML_VERSION_PATCH 1)
+set(GGML_VERSION_PATCH 3)
set(GGML_VERSION_BASE "${GGML_VERSION_MAJOR}.${GGML_VERSION_MINOR}.${GGML_VERSION_PATCH}")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c
index a286083b9..cdc10a759 100644
--- a/ggml/src/ggml.c
+++ b/ggml/src/ggml.c
@@ -7450,7 +7450,7 @@ static void * incr_ptr_aligned(void ** p, size_t size, size_t align) {
static size_t ggml_graph_nbytes(size_t size, bool grads) {
size_t hash_size = ggml_hash_size(size * 2);
- void * p = 0;
+ void * p = (char *) 1024; // workaround for ubsan error "applying non-zero offset X to null pointer"
incr_ptr_aligned(&p, sizeof(struct ggml_cgraph), 1);
incr_ptr_aligned(&p, size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // nodes
incr_ptr_aligned(&p, size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // leafs
@@ -7463,7 +7463,7 @@ static size_t ggml_graph_nbytes(size_t size, bool grads) {
incr_ptr_aligned(&p, ggml_bitset_size(hash_size) * sizeof(ggml_bitset_t), sizeof(ggml_bitset_t));
size_t nbytes = (size_t) p;
- return nbytes;
+ return nbytes - 1024;
}
size_t ggml_graph_overhead_custom(size_t size, bool grads) {
diff --git a/scripts/sync-ggml.last b/scripts/sync-ggml.last
index 8f4afc721..35cd376db 100644
--- a/scripts/sync-ggml.last
+++ b/scripts/sync-ggml.last
@@ -1 +1 @@
-e565a8f4ce2e462c4973a24c51098dd3c81c0256
+353b63b439f27ab2cc19dac97ab1681ba6d2d084