nmarshall commited on
Commit
13079be
·
1 Parent(s): 485180d

qvm: packed string length

Browse files
docs/ASSET_PIPELINE_TODO.md CHANGED
@@ -697,3 +697,6 @@ Research progress: RE-673 [report](research/QVM_MODEL_HIERARCHY.md); remaining n
697
 
698
 
699
  Research progress: RE-674 [report](research/QVM_LEAF_BASIS.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
697
 
698
 
699
  Research progress: RE-674 [report](research/QVM_LEAF_BASIS.md); remaining native/content/runtime/platform scope stays open.
700
+
701
+
702
+ Research progress: RE-675 [report](research/QVM_WORD_STRLEN.md); remaining native/content/runtime/platform scope stays open.
docs/FINDINGS.md CHANGED
@@ -1043,3 +1043,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
1043
 
1044
 
1045
  **RE-674 — Leaf ancestry matrix accumulation:** 23092 accumulates matrices through the node parent chain and repeats the unusual fourth-row source indexing; identity ancestors therefore alter row four. [Evidence](research/QVM_LEAF_BASIS.md).
 
 
 
 
1043
 
1044
 
1045
  **RE-674 — Leaf ancestry matrix accumulation:** 23092 accumulates matrices through the node parent chain and repeats the unusual fourth-row source indexing; identity ancestors therefore alter row four. [Evidence](research/QVM_LEAF_BASIS.md).
1046
+
1047
+
1048
+ **RE-675 — Packed-word string length for resource release:** Complete36038 tests each byte of packed words and returns the first NUL offset, including high-bit data and cross-word boundaries. [Evidence](research/QVM_WORD_STRLEN.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -1023,3 +1023,6 @@ Research progress: RE-673 [report](research/QVM_MODEL_HIERARCHY.md); remaining n
1023
 
1024
 
1025
  Research progress: RE-674 [report](research/QVM_LEAF_BASIS.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
1023
 
1024
 
1025
  Research progress: RE-674 [report](research/QVM_LEAF_BASIS.md); remaining native/content/runtime/platform scope stays open.
1026
+
1027
+
1028
+ Research progress: RE-675 [report](research/QVM_WORD_STRLEN.md); remaining native/content/runtime/platform scope stays open.
docs/RESEARCH_LEDGER.md CHANGED
@@ -1027,3 +1027,8 @@ Complete22009 composes the sample basis only with nonnull parents and uses local
1027
  ## 2026-10-21 — RE-674 Leaf ancestry matrix accumulation (separate task commit)
1028
 
1029
  23092 accumulates matrices through the node parent chain and repeats the unusual fourth-row source indexing; identity ancestors therefore alter row four. 12 independent full4×4 float32 product fixtures cover depths1..4, identity, turn/scale and nondiagonal inputs. Full suite: 1157 tests pass. Report regenerates byte-identically (22327 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
 
 
 
 
 
 
1027
  ## 2026-10-21 — RE-674 Leaf ancestry matrix accumulation (separate task commit)
1028
 
1029
  23092 accumulates matrices through the node parent chain and repeats the unusual fourth-row source indexing; identity ancestors therefore alter row four. 12 independent full4×4 float32 product fixtures cover depths1..4, identity, turn/scale and nondiagonal inputs. Full suite: 1157 tests pass. Report regenerates byte-identically (22327 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
1030
+
1031
+
1032
+ ## 2026-10-21 — RE-675 Packed-word string length for resource release (separate task commit)
1033
+
1034
+ Complete36038 tests each byte of packed words and returns the first NUL offset, including high-bit data and cross-word boundaries. 48 independent byte-length fixtures cover every in-word NUL position, long strings, offset pointers and unchanged input memory; missing backing words reject. Full suite: 1161 tests pass. Report regenerates byte-identically (22547 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
docs/REVERSE_ENGINEERING_TODO.md CHANGED
@@ -1066,3 +1066,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
1066
 
1067
 
1068
  - [x] RE-674 Leaf ancestry matrix accumulation ([report](research/QVM_LEAF_BASIS.md)).
 
 
 
 
1066
 
1067
 
1068
  - [x] RE-674 Leaf ancestry matrix accumulation ([report](research/QVM_LEAF_BASIS.md)).
1069
+
1070
+
1071
+ - [x] RE-675 Packed-word string length for resource release ([report](research/QVM_WORD_STRLEN.md)).
docs/research/QVM_WORD_STRLEN.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Packed-word string length for resource release
2
+
3
+ RE-675. Reproduce with `python3 scripts/analyze_qvm_word_strlen.py`; check with `python3 scripts/test_qvm_word_strlen.py`. The [machine report](qvm-word-strlen.json) retains source identity and bounded fixtures.
4
+
5
+ Actual36039–36120 reads four-byte words, tests low-to-high byte masks and advances by4 until a NUL is found. Independent payload lengths verify outputs through129 bytes with high-bit nonzero data and nonzero bytes after the terminator. This helper is a source implementation, not a supplied native strlen response. LOAD4 can read past the terminator within its word; finite backing memory is explicit. Synthetic unaligned keys do not establish native alignment/page safety. No heap/string ownership or native execution is claimed.
6
+
7
+ No original executable/full QVM/native collision/physics/rendering executes. Native responses and legal input domains are supplied or unverified where stated; full runtime/macOS/Linux Rust/Bevy/Solari gameplay remains open.
docs/research/README.md CHANGED
@@ -624,3 +624,6 @@ The extension collector adds five focused tests for native tail calls, command-r
624
 
625
 
626
  [RE-674: Leaf ancestry matrix accumulation](QVM_LEAF_BASIS.md). Reproduce with `python3 scripts/analyze_qvm_leaf_basis.py`; check with `python3 scripts/test_qvm_leaf_basis.py`.
 
 
 
 
624
 
625
 
626
  [RE-674: Leaf ancestry matrix accumulation](QVM_LEAF_BASIS.md). Reproduce with `python3 scripts/analyze_qvm_leaf_basis.py`; check with `python3 scripts/test_qvm_leaf_basis.py`.
627
+
628
+
629
+ [RE-675: Packed-word string length for resource release](QVM_WORD_STRLEN.md). Reproduce with `python3 scripts/analyze_qvm_word_strlen.py`; check with `python3 scripts/test_qvm_word_strlen.py`.
docs/research/qvm-word-strlen.json ADDED
@@ -0,0 +1,761 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "limits": "Actual36039\u201336120 over explicit word-addressed memory containing a NUL. Packed LOAD4 can read bytes after NUL. Unaligned fixture keys are evaluator inputs, not native alignment/page-safety evidence. Missing memory rejects.",
3
+ "probes": [
4
+ {
5
+ "execution": {
6
+ "byte_writes": [],
7
+ "calls": [],
8
+ "children": [],
9
+ "return": 0,
10
+ "trace": null,
11
+ "trace_length": 23,
12
+ "trace_sha256": "1b349c58c6f21e6a15c703b42348dc1414d4ccc6827fa5d3219b6103707667f5"
13
+ },
14
+ "length": 0,
15
+ "payload_hex": "",
16
+ "pointer": 2018512896,
17
+ "word_memory_unchanged": true
18
+ },
19
+ {
20
+ "execution": {
21
+ "byte_writes": [],
22
+ "calls": [],
23
+ "children": [],
24
+ "return": 0,
25
+ "trace": null,
26
+ "trace_length": 23,
27
+ "trace_sha256": "1b349c58c6f21e6a15c703b42348dc1414d4ccc6827fa5d3219b6103707667f5"
28
+ },
29
+ "length": 0,
30
+ "payload_hex": "",
31
+ "pointer": 2018512897,
32
+ "word_memory_unchanged": true
33
+ },
34
+ {
35
+ "execution": {
36
+ "byte_writes": [],
37
+ "calls": [],
38
+ "children": [],
39
+ "return": 1,
40
+ "trace": null,
41
+ "trace_length": 37,
42
+ "trace_sha256": "a6cd2a09059ed0f19ad38433ac4109baf623116c17f703182c186e97588f7ecc"
43
+ },
44
+ "length": 1,
45
+ "payload_hex": "01",
46
+ "pointer": 2018512896,
47
+ "word_memory_unchanged": true
48
+ },
49
+ {
50
+ "execution": {
51
+ "byte_writes": [],
52
+ "calls": [],
53
+ "children": [],
54
+ "return": 1,
55
+ "trace": null,
56
+ "trace_length": 37,
57
+ "trace_sha256": "a6cd2a09059ed0f19ad38433ac4109baf623116c17f703182c186e97588f7ecc"
58
+ },
59
+ "length": 1,
60
+ "payload_hex": "01",
61
+ "pointer": 2018512897,
62
+ "word_memory_unchanged": true
63
+ },
64
+ {
65
+ "execution": {
66
+ "byte_writes": [],
67
+ "calls": [],
68
+ "children": [],
69
+ "return": 2,
70
+ "trace": null,
71
+ "trace_length": 43,
72
+ "trace_sha256": "e9c82bdb2026c1106640d5bb7321d23bee198ce90359f4182e58182b55a1e2f1"
73
+ },
74
+ "length": 2,
75
+ "payload_hex": "014a",
76
+ "pointer": 2018512896,
77
+ "word_memory_unchanged": true
78
+ },
79
+ {
80
+ "execution": {
81
+ "byte_writes": [],
82
+ "calls": [],
83
+ "children": [],
84
+ "return": 2,
85
+ "trace": null,
86
+ "trace_length": 43,
87
+ "trace_sha256": "e9c82bdb2026c1106640d5bb7321d23bee198ce90359f4182e58182b55a1e2f1"
88
+ },
89
+ "length": 2,
90
+ "payload_hex": "014a",
91
+ "pointer": 2018512897,
92
+ "word_memory_unchanged": true
93
+ },
94
+ {
95
+ "execution": {
96
+ "byte_writes": [],
97
+ "calls": [],
98
+ "children": [],
99
+ "return": 3,
100
+ "trace": null,
101
+ "trace_length": 49,
102
+ "trace_sha256": "a34822537e467d80a627d79dfb82b5dcdfdb8a7b145ab5dc61ea78b29bddcbe3"
103
+ },
104
+ "length": 3,
105
+ "payload_hex": "014a93",
106
+ "pointer": 2018512896,
107
+ "word_memory_unchanged": true
108
+ },
109
+ {
110
+ "execution": {
111
+ "byte_writes": [],
112
+ "calls": [],
113
+ "children": [],
114
+ "return": 3,
115
+ "trace": null,
116
+ "trace_length": 49,
117
+ "trace_sha256": "a34822537e467d80a627d79dfb82b5dcdfdb8a7b145ab5dc61ea78b29bddcbe3"
118
+ },
119
+ "length": 3,
120
+ "payload_hex": "014a93",
121
+ "pointer": 2018512897,
122
+ "word_memory_unchanged": true
123
+ },
124
+ {
125
+ "execution": {
126
+ "byte_writes": [],
127
+ "calls": [],
128
+ "children": [],
129
+ "return": 4,
130
+ "trace": null,
131
+ "trace_length": 64,
132
+ "trace_sha256": "48400504cf85aaf4e728055a74011792e380084af8463ce7f98452ada2a7ea18"
133
+ },
134
+ "length": 4,
135
+ "payload_hex": "014a93dc",
136
+ "pointer": 2018512896,
137
+ "word_memory_unchanged": true
138
+ },
139
+ {
140
+ "execution": {
141
+ "byte_writes": [],
142
+ "calls": [],
143
+ "children": [],
144
+ "return": 4,
145
+ "trace": null,
146
+ "trace_length": 64,
147
+ "trace_sha256": "48400504cf85aaf4e728055a74011792e380084af8463ce7f98452ada2a7ea18"
148
+ },
149
+ "length": 4,
150
+ "payload_hex": "014a93dc",
151
+ "pointer": 2018512897,
152
+ "word_memory_unchanged": true
153
+ },
154
+ {
155
+ "execution": {
156
+ "byte_writes": [],
157
+ "calls": [],
158
+ "children": [],
159
+ "return": 5,
160
+ "trace": null,
161
+ "trace_length": 78,
162
+ "trace_sha256": "806c16c108918883f7186176266f9efbaf88c595452d0447f80541143ead0aa5"
163
+ },
164
+ "length": 5,
165
+ "payload_hex": "014a93dc26",
166
+ "pointer": 2018512896,
167
+ "word_memory_unchanged": true
168
+ },
169
+ {
170
+ "execution": {
171
+ "byte_writes": [],
172
+ "calls": [],
173
+ "children": [],
174
+ "return": 5,
175
+ "trace": null,
176
+ "trace_length": 78,
177
+ "trace_sha256": "806c16c108918883f7186176266f9efbaf88c595452d0447f80541143ead0aa5"
178
+ },
179
+ "length": 5,
180
+ "payload_hex": "014a93dc26",
181
+ "pointer": 2018512897,
182
+ "word_memory_unchanged": true
183
+ },
184
+ {
185
+ "execution": {
186
+ "byte_writes": [],
187
+ "calls": [],
188
+ "children": [],
189
+ "return": 6,
190
+ "trace": null,
191
+ "trace_length": 84,
192
+ "trace_sha256": "57437437d3e3b45443aee2d41ffbcaaa475d7e6f3af8976188ab5229da1e4522"
193
+ },
194
+ "length": 6,
195
+ "payload_hex": "014a93dc266f",
196
+ "pointer": 2018512896,
197
+ "word_memory_unchanged": true
198
+ },
199
+ {
200
+ "execution": {
201
+ "byte_writes": [],
202
+ "calls": [],
203
+ "children": [],
204
+ "return": 6,
205
+ "trace": null,
206
+ "trace_length": 84,
207
+ "trace_sha256": "57437437d3e3b45443aee2d41ffbcaaa475d7e6f3af8976188ab5229da1e4522"
208
+ },
209
+ "length": 6,
210
+ "payload_hex": "014a93dc266f",
211
+ "pointer": 2018512897,
212
+ "word_memory_unchanged": true
213
+ },
214
+ {
215
+ "execution": {
216
+ "byte_writes": [],
217
+ "calls": [],
218
+ "children": [],
219
+ "return": 7,
220
+ "trace": null,
221
+ "trace_length": 90,
222
+ "trace_sha256": "b7078cfb4bed4538e09055d3538145ff1dc05dd118126a45ffb8a1dfdcff699c"
223
+ },
224
+ "length": 7,
225
+ "payload_hex": "014a93dc266fb8",
226
+ "pointer": 2018512896,
227
+ "word_memory_unchanged": true
228
+ },
229
+ {
230
+ "execution": {
231
+ "byte_writes": [],
232
+ "calls": [],
233
+ "children": [],
234
+ "return": 7,
235
+ "trace": null,
236
+ "trace_length": 90,
237
+ "trace_sha256": "b7078cfb4bed4538e09055d3538145ff1dc05dd118126a45ffb8a1dfdcff699c"
238
+ },
239
+ "length": 7,
240
+ "payload_hex": "014a93dc266fb8",
241
+ "pointer": 2018512897,
242
+ "word_memory_unchanged": true
243
+ },
244
+ {
245
+ "execution": {
246
+ "byte_writes": [],
247
+ "calls": [],
248
+ "children": [],
249
+ "return": 8,
250
+ "trace": null,
251
+ "trace_length": 105,
252
+ "trace_sha256": "553ebaaa9efa13eb8016c9594764e71ea9f784ea3e4d16a1b065a7bffb355ae0"
253
+ },
254
+ "length": 8,
255
+ "payload_hex": "014a93dc266fb802",
256
+ "pointer": 2018512896,
257
+ "word_memory_unchanged": true
258
+ },
259
+ {
260
+ "execution": {
261
+ "byte_writes": [],
262
+ "calls": [],
263
+ "children": [],
264
+ "return": 8,
265
+ "trace": null,
266
+ "trace_length": 105,
267
+ "trace_sha256": "553ebaaa9efa13eb8016c9594764e71ea9f784ea3e4d16a1b065a7bffb355ae0"
268
+ },
269
+ "length": 8,
270
+ "payload_hex": "014a93dc266fb802",
271
+ "pointer": 2018512897,
272
+ "word_memory_unchanged": true
273
+ },
274
+ {
275
+ "execution": {
276
+ "byte_writes": [],
277
+ "calls": [],
278
+ "children": [],
279
+ "return": 9,
280
+ "trace": null,
281
+ "trace_length": 119,
282
+ "trace_sha256": "e7d04a06d512976aa0cc697544b754c8743099d311e339831f475ecd89675027"
283
+ },
284
+ "length": 9,
285
+ "payload_hex": "014a93dc266fb8024b",
286
+ "pointer": 2018512896,
287
+ "word_memory_unchanged": true
288
+ },
289
+ {
290
+ "execution": {
291
+ "byte_writes": [],
292
+ "calls": [],
293
+ "children": [],
294
+ "return": 9,
295
+ "trace": null,
296
+ "trace_length": 119,
297
+ "trace_sha256": "e7d04a06d512976aa0cc697544b754c8743099d311e339831f475ecd89675027"
298
+ },
299
+ "length": 9,
300
+ "payload_hex": "014a93dc266fb8024b",
301
+ "pointer": 2018512897,
302
+ "word_memory_unchanged": true
303
+ },
304
+ {
305
+ "execution": {
306
+ "byte_writes": [],
307
+ "calls": [],
308
+ "children": [],
309
+ "return": 10,
310
+ "trace": null,
311
+ "trace_length": 125,
312
+ "trace_sha256": "24ebdf56a7baa883468c86b51e5537941258a24f150765727adb357fbe6d310c"
313
+ },
314
+ "length": 10,
315
+ "payload_hex": "014a93dc266fb8024b94",
316
+ "pointer": 2018512896,
317
+ "word_memory_unchanged": true
318
+ },
319
+ {
320
+ "execution": {
321
+ "byte_writes": [],
322
+ "calls": [],
323
+ "children": [],
324
+ "return": 10,
325
+ "trace": null,
326
+ "trace_length": 125,
327
+ "trace_sha256": "24ebdf56a7baa883468c86b51e5537941258a24f150765727adb357fbe6d310c"
328
+ },
329
+ "length": 10,
330
+ "payload_hex": "014a93dc266fb8024b94",
331
+ "pointer": 2018512897,
332
+ "word_memory_unchanged": true
333
+ },
334
+ {
335
+ "execution": {
336
+ "byte_writes": [],
337
+ "calls": [],
338
+ "children": [],
339
+ "return": 11,
340
+ "trace": null,
341
+ "trace_length": 131,
342
+ "trace_sha256": "49a03d7ea80a76534a04862d59f1420da40c121778aa9e3d504bcd7139cd1c4e"
343
+ },
344
+ "length": 11,
345
+ "payload_hex": "014a93dc266fb8024b94dd",
346
+ "pointer": 2018512896,
347
+ "word_memory_unchanged": true
348
+ },
349
+ {
350
+ "execution": {
351
+ "byte_writes": [],
352
+ "calls": [],
353
+ "children": [],
354
+ "return": 11,
355
+ "trace": null,
356
+ "trace_length": 131,
357
+ "trace_sha256": "49a03d7ea80a76534a04862d59f1420da40c121778aa9e3d504bcd7139cd1c4e"
358
+ },
359
+ "length": 11,
360
+ "payload_hex": "014a93dc266fb8024b94dd",
361
+ "pointer": 2018512897,
362
+ "word_memory_unchanged": true
363
+ },
364
+ {
365
+ "execution": {
366
+ "byte_writes": [],
367
+ "calls": [],
368
+ "children": [],
369
+ "return": 12,
370
+ "trace": null,
371
+ "trace_length": 146,
372
+ "trace_sha256": "bf3e6f87491f4e7cd36ae561805729108d87a93de5889a24109277fd226d3795"
373
+ },
374
+ "length": 12,
375
+ "payload_hex": "014a93dc266fb8024b94dd27",
376
+ "pointer": 2018512896,
377
+ "word_memory_unchanged": true
378
+ },
379
+ {
380
+ "execution": {
381
+ "byte_writes": [],
382
+ "calls": [],
383
+ "children": [],
384
+ "return": 12,
385
+ "trace": null,
386
+ "trace_length": 146,
387
+ "trace_sha256": "bf3e6f87491f4e7cd36ae561805729108d87a93de5889a24109277fd226d3795"
388
+ },
389
+ "length": 12,
390
+ "payload_hex": "014a93dc266fb8024b94dd27",
391
+ "pointer": 2018512897,
392
+ "word_memory_unchanged": true
393
+ },
394
+ {
395
+ "execution": {
396
+ "byte_writes": [],
397
+ "calls": [],
398
+ "children": [],
399
+ "return": 13,
400
+ "trace": null,
401
+ "trace_length": 160,
402
+ "trace_sha256": "e54a8478bc790d1c6049314112af1d643df470a603066f0c18a3b125ed936108"
403
+ },
404
+ "length": 13,
405
+ "payload_hex": "014a93dc266fb8024b94dd2770",
406
+ "pointer": 2018512896,
407
+ "word_memory_unchanged": true
408
+ },
409
+ {
410
+ "execution": {
411
+ "byte_writes": [],
412
+ "calls": [],
413
+ "children": [],
414
+ "return": 13,
415
+ "trace": null,
416
+ "trace_length": 160,
417
+ "trace_sha256": "e54a8478bc790d1c6049314112af1d643df470a603066f0c18a3b125ed936108"
418
+ },
419
+ "length": 13,
420
+ "payload_hex": "014a93dc266fb8024b94dd2770",
421
+ "pointer": 2018512897,
422
+ "word_memory_unchanged": true
423
+ },
424
+ {
425
+ "execution": {
426
+ "byte_writes": [],
427
+ "calls": [],
428
+ "children": [],
429
+ "return": 14,
430
+ "trace": null,
431
+ "trace_length": 166,
432
+ "trace_sha256": "27e9a7f2f780d3ad84b49e2e6ed089994e977de325cd7a74efd238ca890379d8"
433
+ },
434
+ "length": 14,
435
+ "payload_hex": "014a93dc266fb8024b94dd2770b9",
436
+ "pointer": 2018512896,
437
+ "word_memory_unchanged": true
438
+ },
439
+ {
440
+ "execution": {
441
+ "byte_writes": [],
442
+ "calls": [],
443
+ "children": [],
444
+ "return": 14,
445
+ "trace": null,
446
+ "trace_length": 166,
447
+ "trace_sha256": "27e9a7f2f780d3ad84b49e2e6ed089994e977de325cd7a74efd238ca890379d8"
448
+ },
449
+ "length": 14,
450
+ "payload_hex": "014a93dc266fb8024b94dd2770b9",
451
+ "pointer": 2018512897,
452
+ "word_memory_unchanged": true
453
+ },
454
+ {
455
+ "execution": {
456
+ "byte_writes": [],
457
+ "calls": [],
458
+ "children": [],
459
+ "return": 15,
460
+ "trace": null,
461
+ "trace_length": 172,
462
+ "trace_sha256": "41d3b4a6c1983f9284d074e9dee27972fa698dd56e264b6a35233ec265326088"
463
+ },
464
+ "length": 15,
465
+ "payload_hex": "014a93dc266fb8024b94dd2770b903",
466
+ "pointer": 2018512896,
467
+ "word_memory_unchanged": true
468
+ },
469
+ {
470
+ "execution": {
471
+ "byte_writes": [],
472
+ "calls": [],
473
+ "children": [],
474
+ "return": 15,
475
+ "trace": null,
476
+ "trace_length": 172,
477
+ "trace_sha256": "41d3b4a6c1983f9284d074e9dee27972fa698dd56e264b6a35233ec265326088"
478
+ },
479
+ "length": 15,
480
+ "payload_hex": "014a93dc266fb8024b94dd2770b903",
481
+ "pointer": 2018512897,
482
+ "word_memory_unchanged": true
483
+ },
484
+ {
485
+ "execution": {
486
+ "byte_writes": [],
487
+ "calls": [],
488
+ "children": [],
489
+ "return": 16,
490
+ "trace": null,
491
+ "trace_length": 187,
492
+ "trace_sha256": "905af6b402d79b6c479e79cb68831dc3213fc492c7d42806e9aab31da6fffe00"
493
+ },
494
+ "length": 16,
495
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c",
496
+ "pointer": 2018512896,
497
+ "word_memory_unchanged": true
498
+ },
499
+ {
500
+ "execution": {
501
+ "byte_writes": [],
502
+ "calls": [],
503
+ "children": [],
504
+ "return": 16,
505
+ "trace": null,
506
+ "trace_length": 187,
507
+ "trace_sha256": "905af6b402d79b6c479e79cb68831dc3213fc492c7d42806e9aab31da6fffe00"
508
+ },
509
+ "length": 16,
510
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c",
511
+ "pointer": 2018512897,
512
+ "word_memory_unchanged": true
513
+ },
514
+ {
515
+ "execution": {
516
+ "byte_writes": [],
517
+ "calls": [],
518
+ "children": [],
519
+ "return": 17,
520
+ "trace": null,
521
+ "trace_length": 201,
522
+ "trace_sha256": "d5a1bfdd93c2c2b74489794dcc061822fd36bfcf6ba938cf88474c5e84fcc4a0"
523
+ },
524
+ "length": 17,
525
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95",
526
+ "pointer": 2018512896,
527
+ "word_memory_unchanged": true
528
+ },
529
+ {
530
+ "execution": {
531
+ "byte_writes": [],
532
+ "calls": [],
533
+ "children": [],
534
+ "return": 17,
535
+ "trace": null,
536
+ "trace_length": 201,
537
+ "trace_sha256": "d5a1bfdd93c2c2b74489794dcc061822fd36bfcf6ba938cf88474c5e84fcc4a0"
538
+ },
539
+ "length": 17,
540
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95",
541
+ "pointer": 2018512897,
542
+ "word_memory_unchanged": true
543
+ },
544
+ {
545
+ "execution": {
546
+ "byte_writes": [],
547
+ "calls": [],
548
+ "children": [],
549
+ "return": 31,
550
+ "trace": null,
551
+ "trace_length": 336,
552
+ "trace_sha256": "6bd25946a3dc448d14c1e29d2f4fbd1878a91881e32e6dab37b454e51758ae8e"
553
+ },
554
+ "length": 31,
555
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95de2871ba044d96df2972bb054e97",
556
+ "pointer": 2018512896,
557
+ "word_memory_unchanged": true
558
+ },
559
+ {
560
+ "execution": {
561
+ "byte_writes": [],
562
+ "calls": [],
563
+ "children": [],
564
+ "return": 31,
565
+ "trace": null,
566
+ "trace_length": 336,
567
+ "trace_sha256": "6bd25946a3dc448d14c1e29d2f4fbd1878a91881e32e6dab37b454e51758ae8e"
568
+ },
569
+ "length": 31,
570
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95de2871ba044d96df2972bb054e97",
571
+ "pointer": 2018512897,
572
+ "word_memory_unchanged": true
573
+ },
574
+ {
575
+ "execution": {
576
+ "byte_writes": [],
577
+ "calls": [],
578
+ "children": [],
579
+ "return": 32,
580
+ "trace": null,
581
+ "trace_length": 351,
582
+ "trace_sha256": "b5df56e509ca1751636a17709152c512c89862b7eb635d422ae04ecc1512c14a"
583
+ },
584
+ "length": 32,
585
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95de2871ba044d96df2972bb054e97e0",
586
+ "pointer": 2018512896,
587
+ "word_memory_unchanged": true
588
+ },
589
+ {
590
+ "execution": {
591
+ "byte_writes": [],
592
+ "calls": [],
593
+ "children": [],
594
+ "return": 32,
595
+ "trace": null,
596
+ "trace_length": 351,
597
+ "trace_sha256": "b5df56e509ca1751636a17709152c512c89862b7eb635d422ae04ecc1512c14a"
598
+ },
599
+ "length": 32,
600
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95de2871ba044d96df2972bb054e97e0",
601
+ "pointer": 2018512897,
602
+ "word_memory_unchanged": true
603
+ },
604
+ {
605
+ "execution": {
606
+ "byte_writes": [],
607
+ "calls": [],
608
+ "children": [],
609
+ "return": 33,
610
+ "trace": null,
611
+ "trace_length": 365,
612
+ "trace_sha256": "04420de3e2f27c210efd23ad0fcd0bd3a340d981727132e7a778fe9fae7a9769"
613
+ },
614
+ "length": 33,
615
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95de2871ba044d96df2972bb054e97e02a",
616
+ "pointer": 2018512896,
617
+ "word_memory_unchanged": true
618
+ },
619
+ {
620
+ "execution": {
621
+ "byte_writes": [],
622
+ "calls": [],
623
+ "children": [],
624
+ "return": 33,
625
+ "trace": null,
626
+ "trace_length": 365,
627
+ "trace_sha256": "04420de3e2f27c210efd23ad0fcd0bd3a340d981727132e7a778fe9fae7a9769"
628
+ },
629
+ "length": 33,
630
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95de2871ba044d96df2972bb054e97e02a",
631
+ "pointer": 2018512897,
632
+ "word_memory_unchanged": true
633
+ },
634
+ {
635
+ "execution": {
636
+ "byte_writes": [],
637
+ "calls": [],
638
+ "children": [],
639
+ "return": 127,
640
+ "trace": null,
641
+ "trace_length": 1320,
642
+ "trace_sha256": "c4f955de298a56fbb666c040f5324a49d130ca2995a387e4c41f48e624a8ebb9"
643
+ },
644
+ "length": 127,
645
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95de2871ba044d96df2972bb054e97e02a73bc064f98e12b74bd075099e22c75be08519ae32d76bf09529be42e77c00a539ce52f78c10b549de63079c20c559ee7317ac30d569fe8327bc40e57a0e9337cc50f58a1ea347dc61059a2eb357ec7115aa3ec367fc8125ba4ed3780c913",
646
+ "pointer": 2018512896,
647
+ "word_memory_unchanged": true
648
+ },
649
+ {
650
+ "execution": {
651
+ "byte_writes": [],
652
+ "calls": [],
653
+ "children": [],
654
+ "return": 127,
655
+ "trace": null,
656
+ "trace_length": 1320,
657
+ "trace_sha256": "c4f955de298a56fbb666c040f5324a49d130ca2995a387e4c41f48e624a8ebb9"
658
+ },
659
+ "length": 127,
660
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95de2871ba044d96df2972bb054e97e02a73bc064f98e12b74bd075099e22c75be08519ae32d76bf09529be42e77c00a539ce52f78c10b549de63079c20c559ee7317ac30d569fe8327bc40e57a0e9337cc50f58a1ea347dc61059a2eb357ec7115aa3ec367fc8125ba4ed3780c913",
661
+ "pointer": 2018512897,
662
+ "word_memory_unchanged": true
663
+ },
664
+ {
665
+ "execution": {
666
+ "byte_writes": [],
667
+ "calls": [],
668
+ "children": [],
669
+ "return": 128,
670
+ "trace": null,
671
+ "trace_length": 1335,
672
+ "trace_sha256": "41ee86dcc7439acaf85c000622740a1bff61721b2ca55b940964d77074fd768c"
673
+ },
674
+ "length": 128,
675
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95de2871ba044d96df2972bb054e97e02a73bc064f98e12b74bd075099e22c75be08519ae32d76bf09529be42e77c00a539ce52f78c10b549de63079c20c559ee7317ac30d569fe8327bc40e57a0e9337cc50f58a1ea347dc61059a2eb357ec7115aa3ec367fc8125ba4ed3780c9135c",
676
+ "pointer": 2018512896,
677
+ "word_memory_unchanged": true
678
+ },
679
+ {
680
+ "execution": {
681
+ "byte_writes": [],
682
+ "calls": [],
683
+ "children": [],
684
+ "return": 128,
685
+ "trace": null,
686
+ "trace_length": 1335,
687
+ "trace_sha256": "41ee86dcc7439acaf85c000622740a1bff61721b2ca55b940964d77074fd768c"
688
+ },
689
+ "length": 128,
690
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95de2871ba044d96df2972bb054e97e02a73bc064f98e12b74bd075099e22c75be08519ae32d76bf09529be42e77c00a539ce52f78c10b549de63079c20c559ee7317ac30d569fe8327bc40e57a0e9337cc50f58a1ea347dc61059a2eb357ec7115aa3ec367fc8125ba4ed3780c9135c",
691
+ "pointer": 2018512897,
692
+ "word_memory_unchanged": true
693
+ },
694
+ {
695
+ "execution": {
696
+ "byte_writes": [],
697
+ "calls": [],
698
+ "children": [],
699
+ "return": 129,
700
+ "trace": null,
701
+ "trace_length": 1349,
702
+ "trace_sha256": "531b016f83e6d280e16dbc668c73c6d6aa6746de2a41cf4de8c964618e2ed9f3"
703
+ },
704
+ "length": 129,
705
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95de2871ba044d96df2972bb054e97e02a73bc064f98e12b74bd075099e22c75be08519ae32d76bf09529be42e77c00a539ce52f78c10b549de63079c20c559ee7317ac30d569fe8327bc40e57a0e9337cc50f58a1ea347dc61059a2eb357ec7115aa3ec367fc8125ba4ed3780c9135ca5",
706
+ "pointer": 2018512896,
707
+ "word_memory_unchanged": true
708
+ },
709
+ {
710
+ "execution": {
711
+ "byte_writes": [],
712
+ "calls": [],
713
+ "children": [],
714
+ "return": 129,
715
+ "trace": null,
716
+ "trace_length": 1349,
717
+ "trace_sha256": "531b016f83e6d280e16dbc668c73c6d6aa6746de2a41cf4de8c964618e2ed9f3"
718
+ },
719
+ "length": 129,
720
+ "payload_hex": "014a93dc266fb8024b94dd2770b9034c95de2871ba044d96df2972bb054e97e02a73bc064f98e12b74bd075099e22c75be08519ae32d76bf09529be42e77c00a539ce52f78c10b549de63079c20c559ee7317ac30d569fe8327bc40e57a0e9337cc50f58a1ea347dc61059a2eb357ec7115aa3ec367fc8125ba4ed3780c9135ca5",
721
+ "pointer": 2018512897,
722
+ "word_memory_unchanged": true
723
+ }
724
+ ],
725
+ "sha256": "a589351dfe517470a1b121dd2164714987d9e4577bf00c6486e1540035d7a79d",
726
+ "source": {
727
+ "archive": "zUrT43_qvm.pk3",
728
+ "archive_sha256": "b59bf0c5bedf11d50e0edd220da7eade96de40601e98ae14c54c819047df0796",
729
+ "member": {
730
+ "bytes": 983300,
731
+ "comment_hex": "",
732
+ "compressed_bytes": 246560,
733
+ "compression": 8,
734
+ "crc32": "98ea1768",
735
+ "create_system": 0,
736
+ "create_version": 63,
737
+ "date_time": [
738
+ 2018,
739
+ 6,
740
+ 18,
741
+ 22,
742
+ 11,
743
+ 50
744
+ ],
745
+ "directory": false,
746
+ "entry_index": 2,
747
+ "external_attr": 32,
748
+ "extra_hex": "0a0020000000000001001800d1e24e974007d40116dcbf962f1fd20116dcbf962f1fd201",
749
+ "extract_version": 20,
750
+ "flags": 0,
751
+ "header_offset": 221309,
752
+ "internal_attr": 0,
753
+ "occurrence": 0,
754
+ "output": "assets/extracted/zUrT43_qvm.pk3/members/000002/vm/qagame.qvm",
755
+ "path": "vm/qagame.qvm",
756
+ "sha256": "a589351dfe517470a1b121dd2164714987d9e4577bf00c6486e1540035d7a79d",
757
+ "type": "member",
758
+ "volume": 0
759
+ }
760
+ }
761
+ }
scripts/analyze_qvm_word_strlen.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Complete36038 packed-word NUL length, used by string resource release."""
3
+ import itertools
4
+ from pathlib import Path
5
+ from qvm_research_support import source,execute
6
+ from analyze_qvm import write_json
7
+ LOCAL=0x78500000
8
+ POINTER=LOCAL+4096
9
+
10
+ def length(ins,m,pointer):
11
+ m=dict(m);m[LOCAL+28]=pointer;m,_,e=execute(ins,36039,36121,m,(0,0,0),LOCAL);return m,{'pointer':pointer,'length':e['return'],'execution':e}
12
+
13
+ def pack(pointer,payload):
14
+ data=payload+b'\0'+b'XYZ';data+=b'Q'*((-len(data))%4);return {pointer+j:int.from_bytes(data[j:j+4],'little') for j in range(0,len(data),4)}
15
+
16
+ def main():
17
+ q,raw,h,ins=source();rows=[]
18
+ for size,offset in itertools.product(list(range(18))+[31,32,33,127,128,129],[0,1]):
19
+ pointer=POINTER+offset;payload=bytes(1+(j*73)%255 for j in range(size));m=pack(pointer,payload);after,r=length(ins,m,pointer);r['payload_hex']=payload.hex();r['word_memory_unchanged']=all(after[a]==v for a,v in m.items());rows.append(r)
20
+ write_json(Path('docs/research/qvm-word-strlen.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Actual36039–36120 over explicit word-addressed memory containing a NUL. Packed LOAD4 can read bytes after NUL. Unaligned fixture keys are evaluator inputs, not native alignment/page-safety evidence. Missing memory rejects.'})
21
+ if __name__=='__main__':main()
scripts/test_qvm_word_strlen.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest
2
+ from pathlib import Path
3
+ class WordLengthTests(unittest.TestCase):
4
+ @classmethod
5
+ def setUpClass(cls):cls.rows=json.loads(Path('docs/research/qvm-word-strlen.json').read_text())['probes']
6
+ def test_independent_byte_length_across_word_boundaries(self):
7
+ self.assertEqual(len(self.rows),48)
8
+ for p in self.rows:self.assertEqual(p['length'],len(bytes.fromhex(p['payload_hex'])))
9
+ def test_high_bit_bytes_are_not_terminators(self):self.assertTrue(any(any(v>127 for v in bytes.fromhex(p['payload_hex'])) for p in self.rows))
10
+ def test_no_memory_changes_or_native_calls(self):
11
+ for p in self.rows:self.assertTrue(p['word_memory_unchanged']);self.assertEqual(p['execution']['calls'],[])
12
+ def test_missing_terminator_memory_rejected(self):
13
+ from qvm_research_support import source
14
+ from analyze_qvm_word_strlen import length,POINTER
15
+ with self.assertRaisesRegex(ValueError,'unknown'):length(source()[3],{POINTER:0x41414141},POINTER)
16
+ if __name__=='__main__':unittest.main()