Re: [go-nuts] Re: Invalid memory address of string object

2022-09-25 Thread Bernd Fix
On 9/25/22 19:06, 'Axel Wagner' via golang-nuts wrote: Another possibility is someone trying (and failing) to use unsafe to speed things up in a []byte/string conversion and accidentally converts a nil-slice. No unsafe in my own code, but I use a third-party library ("sdlcanvas") for renderi

Re: [go-nuts] Re: Invalid memory address of string object

2022-09-25 Thread Bernd Fix
On 9/25/22 18:35, Jason Phillips wrote: Have your tried building and running your application with the race detector enabled[1]? You may have a data race. Thanks for the advice; that is possible although I have checked that access to all unsafe types like maps and arrays is controlled by mute

Re: [go-nuts] Unicode AzeriCase == TurkishCase?

2022-09-25 Thread "Holloway" Chew, Kean Ho
Hi Rob, hi Kurtis, Okay. Looks like that's the case for the current version. I also briefly skimmed through (https://www.youtube.com/watch?v=WHpqT2nDrfY), it sounds like they have ~10% differences but are they in actualy wording: no idea. I have to get out of the cave and makes new friends. XD No

Re: [go-nuts] Unicode AzeriCase == TurkishCase?

2022-09-25 Thread Kurtis Rader
On Sun, Sep 25, 2022 at 6:54 PM Holloway Kean Ho wrote: > Just to confirm, is the unicode special case "AzeriCase" == "TurkishCase"? > > Location: > https://cs.opensource.google/go/go/+/go1.19.1:src/unicode/letter.go;l=64 > > I don't know about Turkish so help is needed just in case their charse

Re: [go-nuts] Unicode AzeriCase == TurkishCase?

2022-09-25 Thread Rob Pike
I believe so, but unicode.org is the place to research that question. Whatever Go does is defined by Unicode 13.0.0 at the moment. -rob On Mon, Sep 26, 2022 at 11:54 AM Holloway Kean Ho wrote: > > Hi all, > > Just to confirm, is the unicode special case "AzeriCase" == "TurkishCase"? > > Locatio

[go-nuts] Unicode AzeriCase == TurkishCase?

2022-09-25 Thread Holloway Kean Ho
Hi all, Just to confirm, is the unicode special case "AzeriCase" == "TurkishCase"? Location: https://cs.opensource.google/go/go/+/go1.19.1:src/unicode/letter.go;l=64 I don't know about Turkish so help is needed just in case their charsets are different. Stumbled upon this while developing my

Re: [go-nuts] Re: Invalid memory address of string object

2022-09-25 Thread 'Axel Wagner' via golang-nuts
Another possibility is someone trying (and failing) to use unsafe to speed things up in a []byte/string conversion and accidentally converts a nil-slice. It's also possible that the value is not nil, but a pointer to another piece of invalid memory - an mmaped region which got unmapped or a string

Re: [go-nuts] Invalid memory address of string object

2022-09-25 Thread Kurtis Rader
Insufficient information. Show us the panic. Are you using CGO? Can you show the definition of peer.Key()? Is it (or any function it calls) using "unsafe"? On Sun, Sep 25, 2022 at 11:16 AM Bernd Fix wrote: > Hi folks, > > I am using go1.19.1 for development and see a strange panic ("invalid > me

[go-nuts] Re: Invalid memory address of string object

2022-09-25 Thread Jason Phillips
Have your tried building and running your application with the race detector enabled[1]? You may have a data race. 1 - https://go.dev/doc/articles/race_detector On Sunday, September 25, 2022 at 2:16:23 PM UTC-4 Bernd Fix wrote: > Hi folks, > > I am using go1.19.1 for development and see a stran

[go-nuts] Invalid memory address of string object

2022-09-25 Thread Bernd Fix
Hi folks, I am using go1.19.1 for development and see a strange panic ("invalid memory address") in an application; the panic is definitely not triggered by a nil dereference (the object in question is a string): key = peer.Key() entry, ok := tbl.recs[key] The panic happens in the seco

[go-nuts] How to send bytes of data to struct

2022-09-25 Thread Vishnu B
I am new to golang, I have a function that receives the JSON data as bytes(data variable) I want to send that data to a struct(Item Struct), When I use the data or string(data) it doesn't accept it. if it uses JSON ( {Type:"NETFLOW_V5",ObservationPointID:0,ObservationDomainID:0,TimeReceived:16640

[go-nuts] Re: Go Get Issues

2022-09-25 Thread Christoph Berger
Hi Rich, I guess, you run into the behavior described here : *> To declare the code location, an import path of the form> * repository.vcs/path *> specifies the given repository, with or without the .vcs suffix, using the named version con