From 3003e735006e571e52715c711dec4ba5834d7dd9 Mon Sep 17 00:00:00 2001 From: Matthew Stanley <1379tech@gmail.com> Date: Sun, 4 Oct 2026 10:45:25 -0700 Subject: [PATCH] debug_server: JSON-escape render_pass_stats last_abort_detail Co-Authored-By: Claude Opus 5.5 (1M context) --- runtime/src/debug_server.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/src/debug_server.c b/runtime/src/debug_server.c index 7a0c3237..15002c07 100644 --- a/runtime/src/debug_server.c +++ b/runtime/src/debug_server.c @@ -8031,9 +8031,12 @@ static void handle_render_pass_stats(int id, const char *json) uint64_t gd[10], image_bytes = 0; uint32_t image_textures; char failure_json[2048]; + char abort_detail_json[sizeof st.last_abort_detail * 6 + 1]; DirtyRamSpanFailure sf; render_pass_get_stats(&st); dirty_ram_span_last_failure(&sf); + json_escape_string(abort_detail_json, sizeof abort_detail_json, + st.last_abort_detail); const RenderPassFailure *f = &st.last_failure; const GLRenderPassBeginDiag *b = &f->gl; if (!f->reason) { @@ -8117,7 +8120,7 @@ static void handle_render_pass_stats(int id, const char *json) (unsigned long long)st.argument_refused, (unsigned long long)st.status_refused, (unsigned long long)st.begin_refused, (unsigned long long)st.checkpoint_refused, (unsigned long long)st.spans, (unsigned long long)st.span_failures, - failure_json, st.last_abort_detail, + failure_json, abort_detail_json, (unsigned)sf.reason, (unsigned)sf.pc, (unsigned)sf.start_pc, (unsigned)sf.stop_pc, (unsigned)sf.ra, (unsigned)sf.after, (unsigned long long)sf.insns);