Skip to content

crypto/cipher: wasm: Cannot perform Construct on a neutered ArrayBuffer #31812

@bradfitz

Description

@bradfitz

I update the js/wasm builder from v8 to v12 and we now see:

https://storage.googleapis.com/go-build-log/643472f1/js-wasm_8d578b31.log

##### Testing packages.
ok  	archive/tar	5.361s
ok  	archive/zip	19.521s
ok  	bufio	5.000s
ok  	bytes	33.349s
ok  	compress/bzip2	1.545s
ok  	compress/flate	6.292s
ok  	compress/gzip	5.855s
ok  	compress/lzw	3.224s
ok  	compress/zlib	4.874s
ok  	container/heap	4.244s
ok  	container/list	4.117s
ok  	container/ring	4.176s
ok  	context	4.445s
ok  	crypto	3.836s
ok  	crypto/aes	3.900s
--- FAIL: TestXOR (0.24s)
panic: JavaScript error: Cannot perform Construct on a neutered ArrayBuffer [recovered]
	panic: JavaScript error: Cannot perform Construct on a neutered ArrayBuffer

goroutine 21 [running]:
testing.tRunner.func1(0x468f00)
	/workdir/go/src/testing/testing.go:830 +0x38
panic(0x4b6c0, 0x181e020)
	/workdir/go/src/runtime/panic.go:619 +0x20
syscall/js.Value.New(0x7ff800030000000d, 0x441dc8, 0x3, 0x3, 0x20)
	/workdir/go/src/syscall/js/js.go:357 +0x37
syscall/js.typedArrayOf(0x20340, 0x1810680, 0x29e00)
	/workdir/go/src/syscall/js/typedarray.go:85 +0x3d
syscall/js.TypedArrayOf(0x20340, 0x1810680, 0x1a4)
	/workdir/go/src/syscall/js/typedarray.go:57 +0x2
crypto/rand.(*reader).Read(0x2390a0, 0x181c1c0, 0x1a4, 0x1a4, 0x1a4, 0x0, 0x0)
	/workdir/go/src/crypto/rand/rand_js.go:23 +0x3
io.ReadAtLeast(0x80a00, 0x2390a0, 0x181c1c0, 0x1a4, 0x1a4, 0x1a4, 0x1a4, 0x0, 0x0)
	/workdir/go/src/io/io.go:310 +0x6
io.ReadFull(...)
	/workdir/go/src/io/io.go:329
crypto/cipher_test.TestXOR(0x468f00)
	/workdir/go/src/crypto/cipher/xor_test.go:28 +0x28
testing.tRunner(0x468f00, 0x63528)
	/workdir/go/src/testing/testing.go:865 +0xe
created by testing.(*T).Run
	/workdir/go/src/testing/testing.go:916 +0x2d
FAIL	crypto/cipher	4.573s
ok  	crypto/des	4.177s
ok  	crypto/dsa	4.368s
2019/05/02 22:01:34 Failed: exit status 1


Error: tests failed: dist test failed: go_test:crypto/cipher: exit status 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.SoonThis needs action soon. (recent regressions, service outages, unusual time-sensitive situations)TestingAn issue that has been verified to require only test changes, not just a test failure.arch-wasmWebAssembly issuesrelease-blocker

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions