尽快推进:收紧tooldata外部DB边界

This commit is contained in:
cnc
2026-06-05 08:09:06 +08:00
parent 2e2fb34cc3
commit baf8429736
2 changed files with 42 additions and 0 deletions

View File

@@ -37,6 +37,16 @@ source-link/shim guard only; it must not add CNC behavior and must not expand th
| `test-linuxcnc-wasm-tooldata-mmap-symbols.sh` | Compares wasm mmap backend exports with LinuxCNC `tooldata_mmap.cc`. |
| `test-linuxcnc-wasm-tooldata-runtime-symbols.sh` | Compares runtime stub exports with LinuxCNC `tooldata_db.cc` and `tooldata_nml.cc`. |
## External DB Stub Boundaries
- `core/wasm_shims/tooldata/tooldata_runtime_stubs.cc` must keep external DB services unavailable for browser-safe probes; it must not fork, exec, poll,
or keep a live external database process.
- `tooldata_db_init()` must preserve the LinuxCNC `MAX_DB_PROGRAM_ARGS=10`, `strtok_r()` argument splitting, and `access(..., X_OK)` rejection edges from
`src/emc/tooldata/tooldata_db.cc` before returning `-1`.
- `tooldata_db_getall()` must return `-1` while `db_live` is false, and
`tooldata_db_notify()` must return `0` without side effects while `db_live`
is false.
## Boundaries
- Tool table files referenced by switchkins INI files are source coverage only;