You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GopherJS's zero value for unsafe.Pointer is a numeric 0 (I'm guessing for interop with uintptr, but not entirely sure). However, this is incompatible with a pointer interface and causes incorrect behavior when converted into another pointer type:
package main
import (
"unsafe"
)
funcmain() {
varup unsafe.Pointerp:= (*bool)(up)
ifp!=nil {
println("error: p should be nil")
}
println("not nil", *p)
}
By contrast, if up is initialized with unsafe.Pointer((*bool)(nil)), the program works correctly.
The text was updated successfully, but these errors were encountered:
The fix is two-fold:
1. `disableSplice` is initialized with `(*bool)(nil)` to work around
gopherjs#1060.
2. Skipped `TestSplicePipePool`, which relies in runtime features
GopherJS doesn't support.
The fix is two-fold:
1. `disableSplice` is initialized with `(*bool)(nil)` to work around
gopherjs#1060.
2. Skipped `TestSplicePipePool`, which relies in runtime features
GopherJS doesn't support.
The fix is two-fold:
1. `disableSplice` is initialized with `(*bool)(nil)` to work around
gopherjs#1060.
2. Skipped `TestSplicePipePool`, which relies in runtime features
GopherJS doesn't support.
GopherJS's zero value for
unsafe.Pointer
is a numeric0
(I'm guessing for interop withuintptr
, but not entirely sure). However, this is incompatible with a pointer interface and causes incorrect behavior when converted into another pointer type:By contrast, if
up
is initialized withunsafe.Pointer((*bool)(nil))
, the program works correctly.The text was updated successfully, but these errors were encountered: