diff --git a/source/m3_info.c b/source/m3_info.c index 2581559..0174f4e 100644 --- a/source/m3_info.c +++ b/source/m3_info.c @@ -247,24 +247,20 @@ d_m3Decoder (BranchTable) { u32 slot = fetch (u32); - sprintf (o_string, "slot: %" PRIu32 "; targets: ", slot); + o_string += sprintf (o_string, "slot: %" PRIu32 "; targets: ", slot); // IM3Function function = fetch2 (IM3Function); i32 targets = fetch (i32); - char str [1000]; - for (i32 i = 0; i < targets; ++i) { pc_t addr = fetch (pc_t); - sprintf (str, "%" PRIi32 "=%p, ", i, addr); - strcat (o_string, str); + o_string += sprintf (o_string, "%" PRIi32 "=%p, ", i, addr); } pc_t addr = fetch (pc_t); - sprintf (str, "def=%p ", addr); - strcat (o_string, str); + sprintf (o_string, "def=%p ", addr); } @@ -312,7 +308,7 @@ void dump_code_page (IM3CodePage i_codePage, pc_t i_startPC) if (i.info) { - char infoString [1000] = { 0 }; + char infoString [8*1024] = { 0 }; DecodeOperation (infoString, i.opcode, op, i.info, & pc); diff --git a/test/run-wasi-test.py b/test/run-wasi-test.py index 02cdfcf..03decaa 100755 --- a/test/run-wasi-test.py +++ b/test/run-wasi-test.py @@ -176,9 +176,9 @@ for cmd in commands: stats.timeout += 1 fail("Timeout") continue - except subprocess.CalledProcessError: + except subprocess.CalledProcessError as e: stats.crashed += 1 - fail("Crashed") + fail(f"Exited with error code {e.returncode}") continue if "expect_sha1" in cmd: