Repository navigation
runtime: count XMA context and XApu command activity in the audio stand-ins - #2107
Conversation
R0Y00
left a comment
There was a problem hiding this comment.
The opt-in AcpHal sampler runs forever after its first event and closes its thread handle immediately. A regular DLL client can FreeLibrary while that worker is asleep or inside the sampler, leaving it with a return address in the unloaded module. Please tie sampler lifetime to the DLL use (or use synchronous observations), and add a source-built test that loads the DLL, starts activity, then unloads it in a child that stays alive and exits cleanly. Please also run the actual stand-in tests on Windows; the fast PR job does not run them.
tedin7
left a comment
There was a problem hiding this comment.
Review of head 73728f9854c442ec9fbec47baa4521a9ed2682dd (external PR, comment only).
Commands executed
git merge-tree --write-tree --name-only origin/main HEAD: clean, no conflicts.gh pr checks 2107: Linux Python checks, Windows build and gfx1013 fixtures pass; the /O2 and chart jobs are skipped.git diff --check origin/main...HEAD: clean.python3 tests/bidi_controls_check.py: pass.python3 tests/docs_links_check.py: pass (18 files, 402 links).- Win2025 (Server 2025 build 26100, MSVC 14.44, WARP), targets
startup_acphal_xma_activity,startup_stub_acphal,startup_stub_xapu, ctest-R startup_acphal_xma_activity: Debug 1/1 passed, Release /O2 1/1 passed.- The default full-scope run failed on the Windows command-line length limit (PowerShell command over 8191 chars), so I reran with
--scope directand the explicit targets above. This does not run the rest of the suite.
- The default full-scope run failed on the Windows command-line length limit (PowerShell command over 8191 chars), so I reran with
Mutation
src/startup_stubs/acphal.cpp:152: swapped thechangedandclearedcounters (now ? activity.cleared : activity.changed).- Win2025 Debug:
startup_acphal_xma_activityFAILED (expectedxma.changed=3 xma.cleared=2). The mutation is killed. Reverted withgit checkout -- ..
Findings
- P1: none.
- P2: none.
- P3
src/startup_stubs/xapu.cpp(activity_thread, summary line):commands=counts classes plusunreadablebut notrejected, whilerejected=is printed on the same line. A reader may expectcommandsto be every call. Consider naming it in the doc line or in the log text. - P3
src/startup_stubs/acphal.cpp:129-146(sample_locked): sampling is a 10 ms poll, so a context filled and cleared between two samples is not counted. The comment and docs already say this. Fine as documented. - P3
src/startup_stubs/acphal.cpp(watch): ifAcpHalAllocateShapeContextsruns again without anApuFreeof the old array, the old shadow is replaced after one last sample. This is handled correctly. A test for this path would be a nice extra.
Checked and fine: the activity code is off unless X2W_AUDIO_ACTIVITY=1. The unwatch call under the lock in ApuFree runs before heap_give, so the sampler thread cannot read a reused block. GetLastError is saved and restored. The unreadable command is guarded by x2w_local::readable.
AI-assisted; commands listed were executed locally.
|
Thanks for the reviews. Two new commits on top of Sampler lifetime (R0Y00). Both stand-ins no longer start a thread. AcpHal now compares the XMA context array with its copy only inside the calls that count:
It samples at most once per 10 ms, except where a call needs a final sample (re-allocation, I chose synchronous observation over keeping a worker thread, for three reasons:
With no thread, no code from either DLL runs except during a call into it. The cost is the logging gap above, and the sampling interval now follows the caller's call rate. The docs state both. Unload test.
The per-case wait is now 12 s, so all four cases fit the 60 s CTest timeout. tedin7 P3s.
Results. Linux, clang-cl/xwin cross build, run under Proton Experimental Wine: At
At
Mutations. Each was rebuilt, run, then restored and checked by hash. The first four ran at
Not measured: any run on Windows. The stand-in tests have not run under the Windows loader or with AI-assisted. |
tedin7
left a comment
There was a problem hiding this comment.
Re-review of head f4b2d80b2d52b78268b5ce7e485493a59b0bea6d (previous review was on 73728f98; the new commits are the round-1/round-2 fixes plus merges of main).
Scope read: src/startup_stubs/acphal.cpp, xapu.cpp, local_log.h, CMakeLists.txt, docs, tests/startup_acphal_xma_activity.cpp (git diff --stat origin/main...HEAD: 9 files, +869/-1; clean-room, title neutral, mergeable).
Commands executed locally
git diff origin/main...HEAD --check-> clean (rc=0)python3 tests/docs_links_check.py-> self-test passed, 18 files / 412 links OKpython3 tests/bidi_controls_check.py-> 1480 files, no bidi controlsgh pr checks 2107-> Linux Python checks, gfx1013 fixtures and Windows build+test all pass on this head
What I verified by reading
- Counter is off by default (
X2W_AUDIO_ACTIVITY), no thread, nothing runs outside a call into the DLL, so unload leaves no code running (the new unload case covers it). - All shared state (
watched,shadow, counts, ticks) is only touched underactivity_lock/count_lock; logging happens after the lock is released;GetLastErroris preserved on every counted path. ApuFreeof the watched array samples first, then dropswatched/shadowbefore the block can be reused, so no read of freed memory; a secondAcpHalAllocateShapeContextssamples the old array before swapping.- Count structs are all
u64(no padding), so thememcmp"did a count move" test is sound. Snprintf use guardsused >= sizeofbefore the next write; worst-case truncation only shortens the line. - Line cadence (>= 1 s, first counted event starts the interval) matches the comments/docs.
Findings
- P1: none.
- P2: none.
- nit (
acphal.cpppoll_locked):types[256]/classes[320]can truncate if every bucket has a 20-digit delta; harmless, but the doc could say "line may be shortened". - nit (
xapu.cppcount_command): the command class is the first UINT32, a stand-in convention; the docs already say so, keep it labelled that way if a real layout is found.
Not done: I could not run the new CTest or a logic mutation locally: the stubs use MSVC __try/__except (local_log.h:75), which the Linux mingw toolchain here cannot build, and I did not queue the Windows VM (not needed: no shader/gfx2hlsl change). The Windows CI result above is my only runtime evidence.
AI-assisted; commands listed were executed locally.
tedin7
left a comment
There was a problem hiding this comment.
Re-review of head 5c2715dd23957580648f7d789519588f19adad85 (new since the last reviewed head: one commit, audio: count unreadable XApu commands on the early E_POINTER path, plus a merge of main).
What changed
src/startup_stubs/xapu.cpp:266: the earlyE_POINTERreturn inXApuEnqueueCommand(null or unreadable 0x60-byte header) now callscount_command(hr_pointer, nullptr)before returning.
Findings
- P1: none.
- P2: none.
- Nit (no change needed): the early refusal checks
command_header_sizebytes, whilecount_commandonly needs 4. A command pointer that is readable for 4 bytes but not for the whole header used to be counted by its class and is now counted asunreadable. That matches the "refused as unreadable" comment and theE_POINTERresult, so I think it is the right call. The docs and the comment at the top of the counter already say a command the call cannot read counts as unreadable. - Correctness check:
count_commandcallsreadable(nullptr, 4), which is false, so the call lands inunreadableand not inby_class[0]. A null command is not confused with class 0. The full-ringE_OUTOFMEMORYpath still goes through the normal class count at line 279.GetLastErroris saved and restored. WithX2W_AUDIO_ACTIVITYoff, the call returns before any work. - The existing check in
tests/startup_acphal_xma_activity.cpp:266(null command) expectsunreadable = 1at line 286, so it covers the new line. The first-pass finding is therefore addressed.
Commands executed locally (Linux)
git diff f4b2d80..5c2715ddfor the PR files, andgit show 5c2715dd: one line added inxapu.cpp.python3 tests/docs_links_check.py: "Checked 18 Markdown files and 442 links."python3 tests/bidi_controls_check.py: "no bidirectional controls."git diff --check origin/main...HEAD: clean.gh pr view: mergeable.gh pr checksat review time: Linux Python checks pass; the Windows build/test and the gfx1013 fixtures job were still pending.
Not done
- No mutation run: the test is Windows-only C++ and cannot be built on this Linux host. By reading, removing line 266 makes
unreadable0 and the null-command expectation at line 286 fail. A Windows job should confirm this. - No Win2025 run: the PR touches no shader or
gfx2hlslcode, so I did not queue the Windows VM. Please wait for the pending Windows CI job before marking Ready.
AI-assisted; commands listed were executed locally.
|
@JohnConnorNPC could you rebase this branch onto current GitHub reports head Files that conflict with current
Commands run locally: Once it is rebased and CI is green it will be re-checked right away. AI-assisted; commands listed were executed locally. |
The cpu_native_acphal_hal example block had no closing fence, so the ApuFree section after it, and the text up to the next bare fence, rendered as code and their links were not checked.
…the stand-ins Opt-in with X2W_AUDIO_ACTIVITY=1. AcpHal watches the XMA context array it allocates and counts contexts filled, changed and cleared, plus HAL slot2 submits by type; xapu counts XApuEnqueueCommand calls by command class with no cap. Each DLL logs a line per second when a count moved and has an experimental export with the totals. Off, nothing runs.
A source-built caller fills, changes and clears XMA contexts, submits HAL commands and enqueues XApu commands. The on case checks the exact counts from the exports and the logged lines, and that a freed and reused array is no longer counted; the none case writes only next to the contexts and must count 0; the off case reports nothing. Results, outputs, last errors and context bytes must match with the counter on and off.
Adds the X2W_AUDIO_ACTIVITY switch, an Activity counter section under the APU heap stand-in with the line formats and limits, and an experiments entry with the reproduction command for startup_acphal_xma_activity.
… fit CTest timeout The on and off cases now check that ApuAlloc of the same size returns the freed context block, so the not-counted-after-reuse check cannot pass on some other block. expect_on() replaces the repeated on/off expectation lists without changing them. Each case waits 15 s, so all three fit in the 60 s CTest timeout.
…sampler threads; add unload case
…t written line; fix comments
main's XApuEnqueueCommand now refuses a null or unreadable command header with E_POINTER before the activity counter runs, so the unreadable count never moved. Count those calls as unreadable on that path. A call refused for a full ring (E_OUTOFMEMORY) is still counted by its command class.
… size XApuConnect now refuses a size of 0 at input +0x0C (R0Y00#2288), so the fixture's commands all landed on an unknown handle.
5c2715d to
b8cbea6
Compare
pigalot
left a comment
There was a problem hiding this comment.
Reviewed b8cbea6c merged over current main 4b0350ea. The merge is clean and git diff --cached --check is clean.
R0Y00's request on 73728f98 is addressed.
- No thread: neither stand-in starts one any more.
acphal.cppandxapu.cpphave noCreateThread,_beginthreadorstd::thread. - Sampling is synchronous: AcpHal compares the context array with its copy only inside calls into the DLL: a HAL submit,
AcpHalAllocateShapeContexts,ApuFreeonce counting has started, and the export. It does this at most once per 10 ms. The line is written from a counted call and logged after the lock is released. - Freeing the array:
ApuFreeof the watched array stops the watch beforeheap_givecan decommit or reuse the block. - The unload case: this is the child R0Y00 asked for. It loads both DLLs, starts activity in each, calls
FreeLibraryon both, checks withGetModuleHandleExthat both images are unmapped, then stays alive 1.5 s and must exit 0. - Gating: with
X2W_AUDIO_ACTIVITYunset, the export returnsFALSEand the counted calls return before reading caller memory.
What I ran. I did a full build in dev and release, then ran
ctest --test-dir out/build/<preset> --no-tests=error -j 4 -R '^(startup_acphal.*|startup_xapu.*|cpu_native_acphal.*|cpu_native_xapu.*)$' -E '(_hardware$|startup_audio_)'In both presets, 5/5 pass: startup_acphal_xma_activity, startup_acphal_apu_free, startup_xapu_queue, cpu_native_acphal_hal and cpu_native_xapu_queue. I then ran startup_acphal_xma_activity 3 more times in each preset, and every run passed.
Mutants. For each, I rebuilt the two stand-ins and the new test in dev, then ran startup_acphal_xma_activity, startup_acphal_apu_free and startup_xapu_queue:
| Mutant | Result |
|---|---|
AcpHal activity_on() always true |
killed (the off case: the export returns TRUE) |
XApu activity_on() always true |
killed (the off case logs activity lines) |
changed and cleared swapped in sample_locked |
killed |
ApuFree of the watched array keeps watching |
killed (after free and reuse) |
a second AcpHalAllocateShapeContexts skips the final sample of the old array |
killed (re-run without ApuFree) |
| AcpHal line written without the "a count moved" check | killed (zero-write control) |
the E_POINTER refusal not counted as unreadable |
killed (XApu commands, summed lines) |
XApu count_command doesn't restore the caller's last error |
survives |
| 10 ms sample limit removed | survives (cost only, no visible change expected) |
Restored and rebuilt afterwards; git diff --quiet is clean.
Non-blocking.
- Last-error preservation in
count_commandis unpinned. The sentinel transcript would catch a stand-in that changes the last error, but nothing betweenGetLastErrorandSetLastErrorincount_commandchanges it in these runs. So dropping the restore goes unnoticed. That's harmless today. It only matters ifreadable()orlogfstart touching the last error. - The PR description is stale against the current code.
- "compares it about every 10 ms" reads like a timer. The code only samples inside calls, at most once per 10 ms.
- "With the variable unset, the code starts no thread" implies a thread when it's on. No thread is started either way now.
- The "Not measured: Windows CI, …" paragraph is out of date.
Build and test on Windowspasses onb8cbea6c, and the runs above are on Windows. - The docs in the diff already describe the call-driven sampling correctly.
Verdict: approve on b8cbea6c.
Environment: Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10 (no GPU tests in this set).
CI: Build and test on Windows, Assemble and translate gfx1013 fixtures and Run platform-independent Python checks on Linux pass on b8cbea6c.
This reply was AI-assisted.
Conflicts resolved by keeping both sides: - src/startup_stubs/local_log.h: process_seconds() from this branch, then the probe pre-check helpers from main. - src/startup_stubs/xapu.cpp: main's Opus refusal counters, then this branch's count_command() call.
|
I merged current Conflicts. Both were additive, and I kept both sides:
One thing for the author. What I ran on
A different reviewer will re-review the merged head. Environment: Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10; D3D12 WARP. This reply was AI-assisted. |
pigalot
left a comment
There was a problem hiding this comment.
Retested 0ce61ab3 (the merge of main b1e92256 into b8cbea6c) integrated over current main 86beae95 (tree 4287c49e). The trial merge is clean and git diff --cached --check origin/main is clean.
The merge commit's two resolutions look right to me. git show --remerge-diff 0ce61ab3 shows that only the two conflicted files differ from a plain merge:
src/startup_stubs/local_log.h: this branch'sprocess_seconds()is kept whole, with its closing brace.main's probe pre-check helpers follow unchanged. Nothing from either side is dropped.src/startup_stubs/xapu.cppXApuEnqueueCommand:main's#ifdef X2W_HAVE_OPUSrefusal counters run first, after the lock is released. This branch'scount_command(hr, rdx)follows, before the first-calls log. So every call that reaches the end of the function is still counted, with the finalhr.
What I ran. I did a full build in dev and release, then ran
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_acphal.*|startup_xapu.*|startup_stub.*|startup_probe.*|cpu_native_acphal.*|cpu_native_xapu.*)$' -E '(_hardware$|startup_audio_)'6 of 6 pass in each preset, with no skips: startup_acphal_apu_free, startup_xapu_queue, startup_acphal_xma_activity, startup_stubs, cpu_native_acphal_hal and cpu_native_xapu_queue.
Mutant on the resolved line: I removed count_command(hr, …) after the Opus block. startup_acphal_xma_activity fails, printing its expected totals (xapu.commands=7, …) against the summed lines. So the counted call is still pinned at its new position. My earlier mutant table on b8cbea6c covers the rest of the branch, which this merge doesn't change.
Non-blocking, same as the merge comment: with X2W_WITH_OPUS=ON, the new short decode command early return (xapu.cpp, inside #ifdef X2W_HAVE_OPUS) returns E_POINTER before count_command, so that refusal isn't counted. I didn't build the Opus configuration (no libopus here).
My two earlier non-blocking notes on b8cbea6c still apply: the last-error restore in count_command is unpinned, and the PR description is stale.
Verdict: approve on 0ce61ab3. R0Y00's changes-requested review on 73728f98 still stands. I addressed its request at b8cbea6c, but only R0Y00 can clear it, so I'm not merging.
Environment: AMD Ryzen 7 9800X3D, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, Python 3.12.10. No GPU tests in this set.
CI: Build and test on Windows, Assemble and translate gfx1013 fixtures and Run platform-independent Python checks on Linux pass on 0ce61ab3.
This reply was AI-assisted.
… before the queue In an X2W_WITH_OPUS build with typed completions, a type 3 command too short to decode returned E_POINTER before count_command. Count it by its class, as the other E_POINTER refusals after the header read are, and pin it in startup_acphal_xma_activity with a type 3 header that ends where free address space begins (X2W_PROBE_PRECHECK=1 refuses the tail without a fault).
|
Thank you for merging main and for the approval, @pigalot. I took your A new case in the With Wine (Linux), the Opus build has the same 8 failures as main at 0ce61ab and the default build the same 6. @R0Y00, pigalot approved 0ce61ab, the merge this commit builds on; when you have time, could you re-review so CHANGES_REQUESTED can clear? This comment was AI-assisted. |
pigalot
left a comment
There was a problem hiding this comment.
Retested cdab51a0, integrated over current main fdba6e15 (tree 1a409785). The trial merge is clean, and git diff --cached --check origin/main is clean.
What changed since my approval of 0ce61ab3: one line in xapu.cpp, plus a test case and doc updates. Inside #ifdef X2W_HAVE_OPUS, the short-decode-command refusal now calls count_command(hr_pointer, rdx) before it returns E_POINTER. This addresses the non-blocking point I made on 0ce61ab3.
I traced it by reading the code. By that point the 8-byte command_header_size read has already passed readable, and count_command reads only the first UINT32 after its own readable check. hr_pointer isn't hr_handle, so the call lands in by_class[3]. That matches how the in-lock E_POINTER refusals are counted, and the line runs after the type3_commands and refused_short_command Opus counters, so it doesn't change them.
I couldn't build or run the Opus configuration. No libopus is installed here, and no CI job or preset sets X2W_WITH_OPUS. So the added line is checked here only by reading the code, plus JohnConnorNPC's Wine run, which shows xapu.commands=7 with the line removed.
What I ran (default build). I did a full build in dev and release, then ran
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_acphal.*|startup_xapu.*|startup_stub.*|startup_probe.*|cpu_native_acphal.*|cpu_native_xapu.*|docs_links.*|startup_docs.*)$' -E '(_hardware$|startup_audio_)'7 of 7 pass in each preset, with no skips: startup_acphal_apu_free, startup_xapu_queue, startup_acphal_xma_activity, startup_stubs, docs_links, cpu_native_acphal_hal and cpu_native_xapu_queue.
Controls on the new test case (default build):
- With
{"xapu.3", 1}removed from the test's expected totals,startup_acphal_xma_activityfails. So the short command does reach the counter and is classed as 3 without Opus, and the case isn't silently skipped by itsfree_aftercheck. - With the
X2W_PROBE_PRECHECK=1line removed fromspawn, the test still passes. As far as I can see,probe_readablealready refuses the free tail under__try, so precheck only avoids a first-chance fault. That matches the comment, which says the tail is "refused without a fault".
Non-blocking: the short-command check runs before the handle lookup. So in an Opus build, a short type 3 command on an unknown handle counts as class 3, not as rejected=, while the default build counts it as rejected=. The ordering was already there before this commit; the new line only makes it visible in the counts. If that's intended, a sentence in startup-runtime.md would cover it.
Verdict: approve on cdab51a0. R0Y00's changes-requested review on 73728f98 still stands, and only R0Y00 can clear it, so I'm not merging.
Environment: AMD Ryzen 7 9800X3D, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, Python 3.12.10. No GPU tests in this set.
CI: Build and test on Windows, Assemble and translate gfx1013 fixtures and Run platform-independent Python checks on Linux pass on cdab51a0.
This reply was AI-assisted.
R0Y00
left a comment
There was a problem hiding this comment.
Independent native Windows review of cdab51a0, integrated with main f41806a9 as tree cd7c4e2a. Release /O2 passed 3/3 with Opus disabled. Using the installed libopus 1.5.2, Debug and Release /O2 passed 3/3 each with X2W_WITH_OPUS=ON. No skips.
cmake --build <build> --target startup_acphal_xma_activity startup_acphal_apu_free startup_xapu_queue_check
ctest --test-dir <build> --no-tests=error --output-on-failure -j 1 -R '^startup_(acphal_(apu_free|xma_activity)|xapu_queue)$'Removing just the short type-3 command's counter made the Opus Release fixture fail. After restoring the source and relinking, the same test passed. The existing fixture also covers on/off/zero-write behavior, unchanged return and error values, reallocation and DLL unload. The final source keeps polling inside the opt-in calls, with no worker thread.
Windows 11 26200.9974, MSVC x64 19.51, Windows SDK 10.0.26100.0. No GPU or original executable used. On the current merge base the tested audio source, build and fixture files are unchanged.
Title (draft):
runtime: count XMA context and XApu command activity in the audio stand-insChange
Refs #1145. Before any XMA decode work, this adds a way to observe what a caller does with the audio processor through the
desktop stand-ins. With
X2W_AUDIO_PERMISSIVE=1and the new opt-inX2W_AUDIO_ACTIVITY=1:AcpHal.dllkeeps a copy of the XMA context array thatAcpHalAllocateShapeContextshands out, compares it about every 10 ms andcounts contexts filled (all zero to nonzero), changed and cleared, plus HAL slot2 submits by their type argument. No field inside
a context is read or identified.
ApuFreeof the array ends the count before the block can be reused.xapu.dllcounts everyXApuEnqueueCommandcall by command class (the firstUINT32of the command), with no cap. Unreadablecommands and unknown handles are counted separately.
x2w_acphal_xma_activityandx2w_xapu_command_countsreturn the totals.is for review to confirm; the fixture cannot observe it directly. What the fixture's off case does check is the observable
behaviour: the exports return
FALSEwith zeros, no activity line is logged, and every return value, output, last error and thefinal context bytes match the run with the counter on.
The 64-byte context stride and the command class are stand-in conventions, not console contracts. The counter decodes nothing and
does not establish which counted event starts playback.
The first commit closes a code fence that was already open in
docs/experiments.mdand is a prerequisite: without it, the newdocumentation section, together with the existing "ApuFree in the AcpHal stand-in" section, renders as code and its links are not
checked by
tests/docs_links_check.py. It is one line and can be split into its own PR if you prefer.Verification
Commit under test:
73728f98(base5a0b0aad).I have not run this on Windows. The pull-request job (
cmake --build --preset pr,ctest --preset pr) does not build thestartup stand-ins or run their fixtures, so a green PR check does not cover this change. That is the same for the existing
startup_acphal_apu_freeandstartup_xapu_queuefixtures. A Windows result for both configurations comes fromActions → Windows checks → Run workflow on this branch (
workflow_dispatch), or from the main-branch run after merge.Supporting evidence only (Linux host, clang-cl/xwin cross build, run under Wine):
startup_acphal_xma_activity:case on: ok,case none: ok,case off: ok,startup_acphal_xma_activity: ok, exit 0 (4.4 s).ctest --no-tests=error -R '^startup_(acphal|xapu|stubs$|local_log)' -V:startup_acphal_apu_freeandstartup_xapu_queuepass.startup_stubsresolvesAcpHal.dll10/10 andxapu.dll6/6 exports. Under Wine it also fails one unrelated case(
dstorage page-array control), and it fails that case the same way on the base commit.startup_local_logis run becausesrc/startup_stubs/local_log.hgains one inline helper. Under Wine it exits 5 with twoFAIL lines (
concurrent logf lines are all present and intact,concurrent logging child passes), the same as on the basecommit; its four
_controltests pass.tests/docs_links_check.py: 402 links, none broken.tests/bidi_controls_check.py: clean. Platform-independent Python checks(the CI list): 80 of 80 pass.
Not measured: Windows CI, the CMake presets on Windows, the Windows loader, and Windows timer resolution (the 10 ms sample period
depends on it).
Evidence and follow-up
The fixture is source-built and uses only synthetic inputs: one caller script, run in three child processes.
(classes 1, 2 and 0x20), plus one null command and one command on an unknown handle. The exports and the summed log lines must give
exactly these counts. The freed array must come back from
ApuAllocas the same block, and writes to it must not be counted.no line may be logged.
FALSEwith zeros, and no line is logged.Negative controls: I applied each mutation to the final tree and confirmed the fixture fails, each time on the check it targets:
ApuFree;control);
ApuFreenot returning the block;Next step for #1145: use these counts to see whether an application writes or enables XMA contexts, and which counted event goes
with it, before any decoder work.
Checklist
docs/startup-runtime.md,docs/experiments.md).AI-assisted.