michael@0: // This test should not assert. michael@0: michael@0: function asmModule(g, foreign, heap) { michael@0: "use asm"; michael@0: let HEAP8 = new g.Int8Array(heap); michael@0: michael@0: function f() { return 99; } michael@0: return {f: f}; michael@0: } michael@0: michael@0: // linking error michael@0: let m = asmModule(this, 2, new ArrayBuffer(4095)); michael@0: michael@0: print(m.f()); michael@0: michael@0: // linking error michael@0: let m2 = asmModule(this, 2, new ArrayBuffer(2048)); michael@0: michael@0: print(m2.f()); michael@0: