summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorDominic Chen <d.c.ddcc@gmail.com>2016-05-31 19:31:38 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-05-31 19:31:38 -0700
commitb43d48965bcb26e2a0388c308d87963e70685186 (patch)
treee363b969e2d835090d20a5d327347be7aee0f006 /src/wasm.h
parentfa7573de6c3b17f831217e30745ea1092935eb54 (diff)
downloadbinaryen-b43d48965bcb26e2a0388c308d87963e70685186.tar.gz
binaryen-b43d48965bcb26e2a0388c308d87963e70685186.tar.bz2
binaryen-b43d48965bcb26e2a0388c308d87963e70685186.zip
fix bugs found using afl (#546)
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasm.h b/src/wasm.h
index f59e4368f..db8d2c608 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -972,6 +972,7 @@ public:
Expression *condition, *ifTrue, *ifFalse;
void finalize() {
+ assert(ifTrue);
if (ifFalse) {
type = getReachableWasmType(ifTrue->type, ifFalse->type);
}
@@ -1253,6 +1254,7 @@ public:
}
void finalize() {
+ assert(left && right);
if (isRelational()) {
type = i32;
} else {
@@ -1269,6 +1271,7 @@ public:
Expression *ifTrue, *ifFalse, *condition;
void finalize() {
+ assert(ifTrue && ifFalse);
type = getReachableWasmType(ifTrue->type, ifFalse->type);
}
};