The Unchecked Atlasv0.3

Validation boundaries / pattern atlas

Three boundaries

Follow container, topology and value checks. Explore 14,512 recorded pattern matches.

From file framing to native execution

A model checkpoint crosses three distinct verification boundaries before native kernels run. Select 01 Framing, 02 Topology, or 03 Execution below to test how unchecked counts, tensor ranks, and routing indices touch memory—or select a Class I–IV card to filter the 14,512-match sink diagram.

for (i = 0; i < header_count; i++)
    buf[i] = read_entry(stream);
buffer[4] (allocated slots 0..3)0[0]1[1]2[2]3[3]4[4]5[5]Writes 2 cells past buffer[4]

Header count 6, allocated capacity 4: writes 2 cells outside buffer[4] because framing never bounds count against capacity.

Move the sliders or toggle As released / With fix to inspect what each boundary validates in memory. Selecting a boundary tab also focuses its taxonomy definition below.
  1. Boundary 01

    Container framing

    Artifacts .safetensors, .gguf, index.json

    Do the header sizes, offsets and lengths stay inside the file and agree with each other?

    Pickle removal acts here. Replacing a pickle-based checkpoint with a tensor-only container removes code execution at load time, which belongs to Boundary 1. Boundaries 2 and 3 are unchanged: a well-formed file can still declare the wrong geometry or carry values that break native code.

    Pre-load checksS-0 Span and configuration parity

  2. Boundary 02

    Architecture and graph metadata

    Artifacts config.json, generation_config.json, tokenizer.json, GGUF key-value metadata

    Do tensor names, ranks, element types and dimensions agree with the declared model configuration?

  3. Boundary 03

    Numerical values

    Artifacts tensor payloads

    Are the stored numbers safe to use as comparison inputs, divisors, sort keys and array indexes in native code?

    Pre-load checksB3-1 Reject NaN and infinity in float tensorsB3-2A Reject non-finite block scales; allow finite zero and subnormalsB3-2B Require finite, positive divisor scalesB3-3 Range-check routing and index tensors against a trusted boundB3-Spectral Audit weight matrices for rank-one structure

    Select any Class I–IV card to filter the 14,512-match native sink diagram below by its corresponding pattern class:

    • Class IComparison sentinel exhaustionRelease abort · 3,638

      A search loop starts from -1 and NaN makes every comparison false, so the sentinel is later used as an index.

      best = -1; if (NaN > best) false -> table[-1]

      Rule B3-1 · Reject NaN and infinity in float tensors

    • Class IIFloat-to-integer and divisor scaleScale divide & cast · 10,051

      A zero, NaN or huge scale reaches a division or a float-to-integer cast whose result is undefined and differs between CPU architectures.

      (int32_t)(x / scale_d) where scale_d in {0.0, NaN, 1e38}

      Rules B3-2A / B3-2B · Require finite positive divisor scales

    • Class IIIOrdering and reduction mismatchRelease abort · 3,638

      Sorts and running sums assume finite, ordered values; NaN breaks the assumption.

      sort([0.4, qNaN, 0.9]) -> broken comparator / prefix sum

      Rule B3-1 · Finite total-order & prefix-sum invariant

    • Class IVUnchecked integer routingIndex tensor · 823

      A stored integer tensor is used directly as an array subscript or pointer offset without a range check.

      expert_offsets[topk_ids[i]] without 0 <= id < num_experts

      Rule B3-3 · Range-check routing & index tensors

Where stored numbers reach native code

Pattern matches for the four ways a stored number can reach native code unchecked, counted across seven open-source inference and ML source trees. 14,512 matches in all.

Line-oriented pattern matches. They are not bugs and they have not been triaged. A match is a hypothesis. Whether a value in a model file can reach it, and what follows, are separate questions that each need their own check.

  • line-oriented heuristic: macros, templates and cross-function guards are not resolved
  • guard_present means a guard-shaped expression appears earlier in the same function scope; it is not a proof that the guard dominates the sink
  • a hit is a hypothesis that needs a replay and a read of the source at the site; reachability from a weight file and product impact are separate claims

14,512 / 14,512 pattern matches

All patterns across all seven source trees. Counts are pattern matches; they do not establish reachability or confirmed defects.

Each tree counts as 100, so a large tree does not hide a small one. This view compares the mix of patterns within each tree.

Float to int: llama.cpp (ggml/src), 210 matchesFloat to int: whisper.cpp, 242 matchesFloat to int: vLLM (csrc), 115 matchesFloat to int: XNNPACK, 7,877 matchesFloat to int: tract, 138 matchesFloat to int: SentencePiece, 4 matchesFloat to int: OpenCV (modules/dnn), 121 matchesIndex tensor: llama.cpp (ggml/src), 149 matchesIndex tensor: whisper.cpp, 153 matchesIndex tensor: vLLM (csrc), 253 matchesIndex tensor: XNNPACK, 105 matchesIndex tensor: tract, 42 matchesIndex tensor: SentencePiece, 2 matchesIndex tensor: OpenCV (modules/dnn), 119 matchesScale divide: llama.cpp (ggml/src), 573 matchesScale divide: whisper.cpp, 583 matchesScale divide: vLLM (csrc), 36 matchesScale divide: XNNPACK, 87 matchesScale divide: tract, 39 matchesScale divide: SentencePiece, 0 matchesScale divide: OpenCV (modules/dnn), 26 matchesRelease abort: llama.cpp (ggml/src), 1,566 matchesRelease abort: whisper.cpp, 1,747 matchesRelease abort: vLLM (csrc), 288 matchesRelease abort: XNNPACK, 1 matchesRelease abort: tract, 20 matchesRelease abort: SentencePiece, 9 matchesRelease abort: OpenCV (modules/dnn), 7 matchesFloat to intClass IIIndex tensorClass IVScale divideClass IIRelease abortClass I and Class IIIllama.cpp (ggml/src)2,498 matcheswhisper.cpp2,725 matchesvLLM (csrc)692 matchesXNNPACK8,070 matchestract239 matchesSentencePiece15 matches, incompleteOpenCV (modules/dnn)273 matchesFloat to int: llama.cpp (ggml/src), 210 matchesFloat to int: whisper.cpp, 242 matchesFloat to int: vLLM (csrc), 115 matchesFloat to int: XNNPACK, 7,877 matchesFloat to int: tract, 138 matchesFloat to int: SentencePiece, 4 matchesFloat to int: OpenCV (modules/dnn), 121 matchesIndex tensor: llama.cpp (ggml/src), 149 matchesIndex tensor: whisper.cpp, 153 matchesIndex tensor: vLLM (csrc), 253 matchesIndex tensor: XNNPACK, 105 matchesIndex tensor: tract, 42 matchesIndex tensor: SentencePiece, 2 matchesIndex tensor: OpenCV (modules/dnn), 119 matchesScale divide: llama.cpp (ggml/src), 573 matchesScale divide: whisper.cpp, 583 matchesScale divide: vLLM (csrc), 36 matchesScale divide: XNNPACK, 87 matchesScale divide: tract, 39 matchesScale divide: SentencePiece, 0 matchesScale divide: OpenCV (modules/dnn), 26 matchesRelease abort: llama.cpp (ggml/src), 1,566 matchesRelease abort: whisper.cpp, 1,747 matchesRelease abort: vLLM (csrc), 288 matchesRelease abort: XNNPACK, 1 matchesRelease abort: tract, 20 matchesRelease abort: SentencePiece, 9 matchesRelease abort: OpenCV (modules/dnn), 7 matchesFloat to intClass IIIndex tensorClass IVScale divideClass IIRelease abortClass I and Class IIIllama.cpp (ggml/src)2,498 matcheswhisper.cpp2,725 matchesvLLM (csrc)692 matchesXNNPACK8,070 matchestract239 matchesSentencePiece15 matches, incompleteOpenCV (modules/dnn)273 matchesFloat to int: llama.cpp (ggml/src), 210 matchesFloat to int: whisper.cpp, 242 matchesFloat to int: vLLM (csrc), 115 matchesFloat to int: XNNPACK, 7,877 matchesFloat to int: tract, 138 matchesFloat to int: SentencePiece, 4 matchesFloat to int: OpenCV (modules/dnn), 121 matchesIndex tensor: llama.cpp (ggml/src), 149 matchesIndex tensor: whisper.cpp, 153 matchesIndex tensor: vLLM (csrc), 253 matchesIndex tensor: XNNPACK, 105 matchesIndex tensor: tract, 42 matchesIndex tensor: SentencePiece, 2 matchesIndex tensor: OpenCV (modules/dnn), 119 matchesScale divide: llama.cpp (ggml/src), 573 matchesScale divide: whisper.cpp, 583 matchesScale divide: vLLM (csrc), 36 matchesScale divide: XNNPACK, 87 matchesScale divide: tract, 39 matchesScale divide: SentencePiece, 0 matchesScale divide: OpenCV (modules/dnn), 26 matchesRelease abort: llama.cpp (ggml/src), 1,566 matchesRelease abort: whisper.cpp, 1,747 matchesRelease abort: vLLM (csrc), 288 matchesRelease abort: XNNPACK, 1 matchesRelease abort: tract, 20 matchesRelease abort: SentencePiece, 9 matchesRelease abort: OpenCV (modules/dnn), 7 matchesFloat to intClass IIIndex tensorClass IVScale divideClass IIRelease abortClass I and Class IIIllama.cpp (ggml/src)2,498 matcheswhisper.cpp2,725 matchesvLLM (csrc)692 matchesXNNPACK8,070 matchestract239 matchesSentencePiece15 matches, incompleteOpenCV (modules/dnn)273 matches
The class labels on the left name the failure classes a pattern is indicatively linked to. The link is a reading aid, not a measurement. A hatched tree was not scanned completely.

The same counts as a table

Source treePinned atLinesFloat to intIndex tensorScale divideRelease abortAllPer 1,000 lines
llama.cpp (ggml/src)223373742b266,8092101495731,5662,4989.36
whisper.cpp95ea8f9bfb506,1322421535831,7472,7255.38
vLLM (csrc)ee0da84ab9108,017115253362886926.41
XNNPACK0a66ebb5812,990,1997,8771058718,0702.70
tract5b7ef4f8c6222,0941384239202391.08
SentencePieceincompletebcd4d8c92f46,6294209150.32
OpenCV (modules/dnn)43a4c20ef8264,8771211192672731.03
All trees4,404,7578,7078231,3443,63814,512

Each row is a recorded scan of the tree at the upstream commit shown. No file, line or function is published.