summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-04-13 07:58:10 -0700
committerGitHub <noreply@github.com>2020-04-13 07:58:10 -0700
commitd7d251b75c46a814b764ff2ded0d9c5a275a7e46 (patch)
tree2be2f8c988b3057dc85e3e717276043de15e5397 /src
parent53c70d9ccd56d9d28eb65ccc5954024b6b0e921b (diff)
downloadbinaryen-d7d251b75c46a814b764ff2ded0d9c5a275a7e46.tar.gz
binaryen-d7d251b75c46a814b764ff2ded0d9c5a275a7e46.tar.bz2
binaryen-d7d251b75c46a814b764ff2ded0d9c5a275a7e46.zip
Use std::cout for interpreter trap logging (#2755)
We used std::cerr as a workaround for that this logging interfered with spec testing. But it's easy enough to filter out this stuff for the spec tests. The benefit to using std::cout is that as you can see in the test output here, this is relevant test output - it's not a side channel for debugging. If the rest of the interpreter output is in std::cout but only traps are in std::cerr then they might end up out of order etc., so best to keep them all together. This will allow easier additions of tests for fuzz testcases
Diffstat (limited to 'src')
-rw-r--r--src/shell-interface.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shell-interface.h b/src/shell-interface.h
index 94ecd61c3..a5293ac76 100644
--- a/src/shell-interface.h
+++ b/src/shell-interface.h
@@ -218,7 +218,7 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface {
}
void trap(const char* why) override {
- std::cerr << "[trap " << why << "]\n";
+ std::cout << "[trap " << why << "]\n";
throw TrapException();
}
};