This website requires JavaScript.
Explore
Help
Sign in
andodeki
/
makepad
Watch
1
Star
0
Fork
You've already forked makepad
0
Code
Issues
Pull requests
Projects
Releases
Packages
Wiki
Activity
Actions
work
makepad
/
platform
/
script
/
audio_aot
/
tests
History
Download ZIP
Download TAR.GZ
Exact
Exact
Union
RegExp
Admin
68838d6a53
work: Relax JIT campaign batch 2026-10-23 (owner/PGO hang fix, JIT memory + run monitor fix, rustc suite 99.70%, Flow OSS app, skins OSS, Stage logs, Rogier + makepad PR syncs)
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:18:28 +02:00
..
audio_aot.rs
work: Relax JIT campaign batch 2026-10-23 (owner/PGO hang fix, JIT memory + run monitor fix, rustc suite 99.70%, Flow OSS app, skins OSS, Stage logs, Rogier + makepad PR syncs)
2026-10-23 15:18:28 +02:00
compiler_fuzz.rs
script (compute): admission for untrusted kernels, compiler fuzzing, and a lowering panic fixed -- makepad_script_compute::admission decides whether a job may run before it is queued: the kernel's worst case for count elements (static cost per element, every host-buffer access and every load from a large shared table charged as a cache and TLB miss) must fit the job's wall budget on the threads it may use; for untrusted origins (AI, store, LAN, livecode) one element's worst case must also stay under the element latency (1 ms), which bounds how long the per-element cancel poll takes to stop a job, and an untrusted job's wall budget is capped (2 s); a device-wide Ledger sums the worst-case worker time and job count of every admitted, unfinished job, with a smaller share for untrusted origins, and refuses what does not fit with the numbers (TooMany, ElementTooSlow, OverBudget, DeviceBusy, TooManyJobs). An admitted job holds a Ticket (Send, returned on drop) whose work_limit feeds Call::set_work_limit and whose deadline is the watchdog's; RK1's scheduler calls admit in submit. The rates are measured by examples/bench_admission.rs (max 0.32 ns/op native, 2.46 ns/op interpreted, 114 ns per dependent load over 64 MiB) and kept with 1.5-2x margin. Kernel::shared_words for the shared-table charge. New tests/compiler_fuzz.rs (compute: 20k mutants of 11 corpus kernels, truncated, spliced, number-swapped, every truncation of every corpus kernel; what compiles is admitted untrusted, then run natively and interpreted with guard words, bit-equal) and audio_aot/tests/compiler_fuzz.rs (3k mutated shaders, native and interpreted renders bit-equal). The fuzz found a compiler panic: a constant initializer folded in a scratch builder could see an outer local (
inst,[i].pos = ...
) and index the scratch builder's empty tables; Builder::cst/sel/get now treat a foreign value as not constant, so it is the ordinary "initial values must be constants" error. Checked: cargo test --release -p makepad-script-compute (tests/admission.rs 5: loads charged as misses, untrusted element bound per origin, budgets and ceilings, the device ledger, cancel at the admitted ceiling stops within 2 ms -- measured 0.12-0.37 ms native, 0.08-0.24 ms interpreted over dependent loads, fdiv and sin chains; compiler_fuzz 2, kernels 3, soundness 14; 8 extra seeds x 50k mutants clean) and -p makepad-script-audio-aot (21, the 36 golden render hashes unchanged; compiler_fuzz 1, 4 seeds x 10k clean), on a tree of HEAD plus this commit.
2026-09-30 10:40:58 +02:00