octave+r-lang: 5-MOAD scan; 1 CWE-407 defect (r-lang-0001), octave MOAD 0002-0005 CLEAN
r-lang-0001: namespace.R getNamespaceUsers() O(N*I) match() linear scan and namespaceImportMethods() O(G*V) %in% double scan; fix: hash env + reverse index. Unit test: 5.4x (namespace users) and 5.6x (import methods) speedup. PASS. Octave: MOAD-0002 through 0005 all CLEAN (single-threaded, no ThreadLocal, no credential logging found, no concurrent cache races).
This commit is contained in:
parent
fb1ff685c1
commit
5df58dac32
5 changed files with 391 additions and 0 deletions
38
defects/octave/patch/octave-moad-0002-to-0005-CLEAN.md
Normal file
38
defects/octave/patch/octave-moad-0002-to-0005-CLEAN.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# GNU Octave — MOAD-0002 through MOAD-0005 Scan: CLEAN
|
||||
|
||||
## Scan Date
|
||||
2026-03-31
|
||||
|
||||
## Target
|
||||
GNU Octave (numerical computing)
|
||||
Source: https://github.com/gnu-octave/octave (shallow clone)
|
||||
|
||||
## Note
|
||||
MOAD-0001 (CWE-407) already covered by octave-0001 and octave-0002 patches
|
||||
and octave-deeper-CLEAN.md. This document covers remaining MOADs.
|
||||
|
||||
## MOAD-0002 Intertangle
|
||||
**CLEAN**
|
||||
- `interpreter` class in `libinterp/corefcn/interpreter.h` (660 lines) aggregates all subsystems via well-typed member references (`m_evaluator`, `m_help_system`, `m_load_path`, `m_symbol_table`, etc.).
|
||||
- These are distinct typed subsystems accessed through typed accessors. No pathological entanglement of independent state through a single mutable god-object field.
|
||||
- Octave is a scripting interpreter — a central interpreter object owning subsystems is the standard architecture. No cross-subsystem mutation coupling found.
|
||||
|
||||
## MOAD-0003 Leaked Context
|
||||
**CLEAN**
|
||||
- Octave is predominantly single-threaded (the interpreter loop). No `thread_local` or `pthread_key_create` carrying per-request identity was found in `libinterp/`.
|
||||
- The evaluator and call stack are owned by `pt_eval` as explicit stack data, not thread-local storage.
|
||||
|
||||
## MOAD-0004 CWE-312
|
||||
**CLEAN**
|
||||
- `__ftp__.cc` line 77: `uhm.make_url_handle(host, user, passwd, octave_stdout)` passes `octave_stdout` for libcurl progress/verbose output, but our sparse clone does not include the `liboctave/` url-transfer implementation.
|
||||
- Reviewed `url-handle-manager.h`: `octave_stdout` stream is stored as a reference in the `url_transfer` object for curl debug callbacks, not for credential logging.
|
||||
- No `octave_stdout << passwd` or `message(passwd)` patterns found.
|
||||
- No credential strings printed to stdout in `__ftp__.cc`, `urlwrite.cc`, or `url-handle-manager.cc`.
|
||||
|
||||
## MOAD-0005 Thundering Herd
|
||||
**CLEAN**
|
||||
- Octave is single-threaded. Cache patterns in `load-save.cc` (`m_mcos_object_load_cache`, `m_mcos_object_save_cache`) and `load-path.cc` (`s_abs_dir_cache`) are accessed only from our single interpreter thread. No `get+null+compute+put` concurrent race possible.
|
||||
- `gh-manager.h` latex cache uses proper find-then-insert pattern within a single-threaded graphics handler.
|
||||
|
||||
## Conclusion
|
||||
All MOAD-0002 through MOAD-0005 checks: CLEAN. No defects beyond octave-0001 and octave-0002.
|
||||
Loading…
Add table
Add a link
Reference in a new issue