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
$ garble version
mvdan.cc/garble v0.13.0
$ go version
go version go1.23.3 windows/amd64
What environment are you running Garble on?
Windows 11
go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\GUY\AppData\Local\go-build
set GOENV=C:\Users\GUY\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\GUY\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\GUY\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.23.3
set GODEBUG=
set GOTELEMETRY=local
set GOTELEMETRYDIR=C:\Users\GUY\AppData\Roaming\go\telemetry
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\GUY\AppData\Local\Temp\go-build1744563614=/tmp/go-build -gno-record-gcc-switches
What did you do?
create a main.go with a package using unsafe package and
use //garble:controlflow
Create a main.go which call a package
the package need to use unsafe package and //garble:controlflow on it
it will simply crash saying it cannot resolve the package or typecheck error: utils\unsafe.go:5:2: "unsafe" imported and not used
What did you expect to see?
Compile it normally
What did you see instead?
Crashing
The text was updated successfully, but these errors were encountered:
Can you share an example which triggers this issue?
sure it have this error:
example.go:
package example
import (
"fmt""unsafe"
)
//garble:controlflowfuncModifyValue() {
varaint=42varp*int=&afmt.Println("Value of a:", a)
fmt.Println("Address of a:", p)
varup unsafe.Pointer=unsafe.Pointer(p)
varp2*int= (*int)(up)
*p2=100fmt.Println("New value of a:", a)
}
main.go:
package main
import (
"main/example"
)
funcmain() {
example.ModifyValue()
}
What version of Garble and Go are you using?
1.23.3
What environment are you running Garble on?
Windows 11
go env
OutputWhat did you do?
create a main.go with a package using unsafe package and
use //garble:controlflow
What did you expect to see?
Compile it normally
What did you see instead?
Crashing
The text was updated successfully, but these errors were encountered: