go-interpreter / wagon

wagon, a WebAssembly-based Go interpreter, for Go.
BSD 3-Clause "New" or "Revised" License
902 stars 150 forks source link

names used in wasm import/export/module etc need to be valid utf-8 string #145

Closed laizy closed 5 years ago

laizy commented 5 years ago

from the WebAssembly Specifications:

Names are sequences of characters, which are scalar values as defined by [UNICODE] (Section 2.4).

the golang string is just raw bytes wrapper, so need add utf-8 encoding check at https://github.com/go-interpreter/wagon/blob/master/wasm/read.go#L32