Skip to content

affected/package: unknown #50565

Closed
Closed
@wabzsy

Description

@wabzsy

What version of Go are you using (go version)?

$ go version
go version go1.17.5 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/wabzsy/Library/Caches/go-build"
GOENV="/Users/wabzsy/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/wabzsy/Projects/Golang/pkg/mod"=
GOOS="darwin"
GOPATH="/Users/wabzsy/Projects/Golang"=
GOPROXY="https://goproxy.io,direct"
GOROOT="/usr/local/Cellar/go/1.17.5/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.17.5/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17.5"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/wabzsy/Projects/Golang/src/attach/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/z0/z9d61sxx3t13jh7kqkzmbg9c0000gn/T/go-build1349201566=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

package main

import (
	"fmt"
	"syscall"
)

var x = syscall.Signal(18)

func main() {
	fmt.Printf("d: %d\n", x&0x80)
	fmt.Printf("x: %x\n", x&0x80) // is this a bug?
	fmt.Printf("v: %#v\n", x&0x80)
}

https://go.dev/play/p/nwpIYydEIEE

What did you expect to see?

d: 0
x: 0
v: 0

What did you see instead?

d: 0
x: 7369676e616c2030
v: 0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions