From 18aa94c087f79da9706e8d3af8104816ee79e573 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Thu, 12 May 2022 12:35:57 -0700 Subject: Make RefCast safe by default (#4663) This prevents new `RefCast` expressions that don't explicitly have their safety set from getting an unitialized safety value. --- src/wasm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/wasm.h b/src/wasm.h index b8e3d6704..6e8db91c9 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1460,7 +1460,7 @@ public: // Support the unsafe `ref.cast_nop_static` to enable precise cast overhead // measurements. enum Safety { Safe, Unsafe }; - Safety safety; + Safety safety = Safe; void finalize(); -- cgit v1.2.3