Re: [go-nuts] fatal error: too many address space collisions for -race mode

2021-12-03 Thread Ian Lance Taylor
On Fri, Dec 3, 2021 at 3:29 PM Narayanan Iyer wrote: > > I have a go application (which uses cgo in case it helps) that started giving > the error in the email subject once I added -ldflags 'fsanitize=address' to > the go build -race and go test -race commands. > > The go build and go test comma

[go-nuts] fatal error: too many address space collisions for -race mode

2021-12-03 Thread Narayanan Iyer
Hi, I have a go application (which uses cgo in case it helps) that started giving the error in the email subject once I added *-ldflags 'fsanitize=address'* to the *go build -race* and *go test -race *commands. The go build and go test commands had -race turned on from before and have been wor

[go-nuts] Re: httptest and gorilla/mux route variables

2021-12-03 Thread Kevin Mathew S
This works perfectly for me func newReq(method, path, body string, vars map[string]string) *http.Request { r := httptest.NewRequest(method, path, strings.NewReader(body)) return mux.SetURLVars(r, vars) } On Tuesday, May 12, 2015 at 7:34:21 PM UTC+5:30 al...@getloopd.com wrote: > Awesome! This

[go-nuts] Advise about using go mod retract to fix pre go mod v2.0.0 tag

2021-12-03 Thread Steven Hartland
One of the golang packages I maintain redigo had a v2.0.0 tag created before the introduction of go mod and this still causes challenges today. A kind soul pointed out go mod retract the other day in the h

Re: [go-nuts] Does crypto/AES work on hardware that doesn't have the aes instruction set? Hello, Will crypto/aes, cipher/GCM work on hardware without embedded aes support?

2021-12-03 Thread Matthew Walster
Whoops, yes, there is a feature flag there I missed "supportsAES" etc. It appears to be gated on that instruction being present, at which time the operation becomes roughly constant time. M On Fri, 3 Dec 2021, 08:53 Matthew Walster, wrote: > Sure, it's enabled in a build constraint: > > > htt

Re: [go-nuts] Does crypto/AES work on hardware that doesn't have the aes instruction set? Hello, Will crypto/aes, cipher/GCM work on hardware without embedded aes support?

2021-12-03 Thread Matthew Walster
Sure, it's enabled in a build constraint: https://cs.opensource.google/go/go/+/refs/tags/go1.17.3:src/crypto/aes/cipher_asm.go It's not an exact science, there's no testing for the instruction afaict, it's just that anything running the amd64 architecture has the aesni instructions. I assume like