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] 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