myxce/src/scheduler
Rongsong Shen b450a6806b
fix(scheduler): activate virtual-clock logging for sim/REPL sessions (Req 5 AC 3)
sched_sim_driver_start() now registers the core's tlog format function and
marks its core active for logging right after the virtual clock is seeded
(xce_core_register_tlog_format()/xce_core_set_active_for_logging()) --
every log line for the rest of the run shows frozen/scaled replay time
instead of real wall-clock time, matching what an operator debugging
against a replay's own timeline needs. sched_sim_driver_run() deactivates
on all 7 of its return paths, since there's no sim-driver teardown
function and g_active_core_for_logging would otherwise dangle past the
caller's stack frame.

Also fixes a genuine pre-existing ASAN stack-use-after-return (bug-1598)
the new deactivation test exposed: sim_picker_thread_fn is spawned but, by
design, never joined/cancelled, so a stack-local `xce_sched_sim_driver_t
sim` in test_sim_event_loop.c was always a latent UAF once its owning test
function returned -- just not previously triggered by any prior test
ordering. Switched the three affected fixtures in that file to `static`
storage (safe: sched_sim_driver_start() memsets the whole struct on entry,
and none of the three call sites are re-entrant).
2026-08-19 11:00:33 +00:00
..
include fix(scheduler): clock/resval/jobid-format fixes plus REPL live-operator gaps (task 12.5) 2026-08-19 09:48:46 +00:00
src fix(scheduler): activate virtual-clock logging for sim/REPL sessions (Req 5 AC 3) 2026-08-19 11:00:33 +00:00
testsuite fix(scheduler): activate virtual-clock logging for sim/REPL sessions (Req 5 AC 3) 2026-08-19 11:00:33 +00:00
CLAUDE.md update documents 2026-08-10 17:51:51 +08:00
meson.build fix(scheduler): sim mode picker never learns about the initial snapshot's own jobs/queues (bug-1567) 2026-08-17 10:21:11 +00:00