From a008d4fd7af3b04a3d351a03d56df7c28998690e Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Fri, 26 Aug 2016 02:13:00 +0800 Subject: Fix asm2wasm dead lock caused by empty modules. This commit fixes an asm2wasm dead lock when asm2wasm is compiling an empty module, i.e. a module without any functions. Without this commit, worker threads are likely to leave `workerMain()` and decrease `liveWorkers` early. Consequently, `waitUntilAllReady()` will never observe `liveWorkers == numWorkers`. --- test/empty.asm.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 test/empty.asm.js (limited to 'test/empty.asm.js') diff --git a/test/empty.asm.js b/test/empty.asm.js new file mode 100644 index 000000000..94fa6bb38 --- /dev/null +++ b/test/empty.asm.js @@ -0,0 +1,4 @@ +function EmptyModule() { + 'use asm'; + return {}; +} -- cgit v1.2.3