logging: avoids logging activity to stdio file descriptors (#1007)
This avoids logging activity on stdio file descriptors, in order to help make troubleshooting easier. Usually, there isn't an issue in these, yet wasm panics are harder to read if there is also logging of the .. logging. Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
@@ -251,3 +251,14 @@ func (f *stackFunc) Call(ctx context.Context, mod api.Module, wasmStack []uint64
|
||||
func NewStack(name string, mem api.Memory, sp uint32) *stack {
|
||||
return &stack{goarch.NewStack(name, mem, sp)}
|
||||
}
|
||||
|
||||
var Undefined = struct{ name string }{name: "undefined"}
|
||||
|
||||
func ValueToUint32(arg interface{}) uint32 {
|
||||
if arg == RefValueZero || arg == Undefined {
|
||||
return 0
|
||||
} else if u, ok := arg.(uint32); ok {
|
||||
return u
|
||||
}
|
||||
return uint32(arg.(float64))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user