Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

isa-guard: trust the reviewed wmemcmp COMDAT in arg.obj and server-connect.obj

purple985b23dac093
diff --git a/scripts/win-isa-guard.mjs b/scripts/win-isa-guard.mjs
index c7dfec90..ae28b34f 100644
--- a/scripts/win-isa-guard.mjs
+++ b/scripts/win-isa-guard.mjs
@@ -326,6 +326,20 @@ const WMEMCMP_MEMCMP_HOST_OBJECTS = new Set([
'unicode.obj',
'ggml-backend-reg.obj',
'server-context.obj',
+ // 3.1.2 (19.11.2026, A40): llama.cpp b11960 split common.cpp and the
+ // server sources, so on MSVC 14.44.35207 (windows-2025-vs2026, pinned by
+ // LLAMA_MSVC_TOOLSET) the linker hands the same wmemcmp COMDAT to the
+ // first referencing object of the new layout. Reviewed by hand on the
+ // dumps of sidecar-windows run 44444819140: the wmemcmp in arg.obj
+ // (llama-common.dll) and in server-connect.obj (llama-server-impl.dll) is
+ // instruction for instruction, function-relative jump targets included,
+ // the copy in ggml-backend-reg.obj (ggml.dll) this list already trusts.
+ // Its AVX2 block is entered only past `cmp _Avx2WmemEnabled; je +05f`,
+ // and the vzeroupper at +11f the dominance check could not place is
+ // reached only from `jne +0f5` inside that block (a ret precedes +0f5).
+ // Evidence: ~/Desktop/Zentrale/uebergabe-310/A40-METAL/isa-review-1444/.
+ 'arg.obj',
+ 'server-connect.obj',
]);
// A .map Lib:Object field can carry a "Lib:Object" form (e.g.
diff --git a/scripts/win-isa-guard.test.mjs b/scripts/win-isa-guard.test.mjs
index d6c00f8a..7dd4d3b0 100644
--- a/scripts/win-isa-guard.test.mjs
+++ b/scripts/win-isa-guard.test.mjs
@@ -89,6 +89,11 @@ test('isAllowlisted: msvcprt:vector_algorithms.obj, MSVCRT:*, and wmemcmp/memcmp
assert.equal(isAllowlisted({ obj: 'unicode.obj', name: 'memcmp' }), true);
assert.equal(isAllowlisted({ obj: 'ggml-backend-reg.obj', name: 'wmemcmp' }), true);
assert.equal(isAllowlisted({ obj: 'server-context.obj', name: 'wmemcmp' }), true);
+ // 3.1.2: the b11960 layout hands the same reviewed wmemcmp COMDAT to these.
+ assert.equal(isAllowlisted({ obj: 'arg.obj', name: 'wmemcmp' }), true);
+ assert.equal(isAllowlisted({ obj: 'server-connect.obj', name: 'wmemcmp' }), true);
+ // Only that exact symbol: other code in those objects stays checked.
+ assert.equal(isAllowlisted({ obj: 'arg.obj', name: 'common_params_parse' }), false);
assert.equal(isAllowlisted({ obj: 'ggml-quants.obj', name: 'iq2xs_init_impl$omp$1' }), false);
});