[go-nuts] Re: Copy map with empty interfaces

2017-06-05 Thread Egon
On Monday, 5 June 2017 18:11:00 UTC+3, Chun Zhang wrote: > > Unfortunately it does not give any info. :( > Can you upload the code somewhere? Other ideas: 1. set environment variable GODEBUG to cgocheck=2 2. try valgrind - maybe it picks something up (not sure how well it works) 3. try sanitizer

[go-nuts] Re: Copy map with empty interfaces

2017-06-05 Thread Tamás Gulácsi
Can you simplify it with map[string]interface{}? Otherwise, the error indicates impedance mismatch between C++ and Go. This is hard to debug - put printf everywhere, print the allocated/freed/sent/received pointers (%p), and _reduce_ the program line-by-line, till the error vanishes. -- You re

[go-nuts] Re: Copy map with empty interfaces

2017-06-05 Thread Chun Zhang
Unfortunately it does not give any info. :( Thanks, Chun On Saturday, June 3, 2017 at 1:16:18 PM UTC-4, Egon wrote: > > Does race detector say something useful? > > On Friday, 2 June 2017 21:18:31 UTC+3, Chun Zhang wrote: >> >> I am trying to store some complicated data structure with a map, and

[go-nuts] Re: Copy map with empty interfaces

2017-06-05 Thread Chun Zhang
Hi, Tamas, Thanks for the reply! The key is a string for my current use. After the data v is retrieved, it is compared with a new data coming from the wire. And then based on the comparison, the new data, which is a newly created piece of memory contains same type of data, will be sent to a C

[go-nuts] Re: Copy map with empty interfaces

2017-06-03 Thread Egon
Does race detector say something useful? On Friday, 2 June 2017 21:18:31 UTC+3, Chun Zhang wrote: > > I am trying to store some complicated data structure with a map, and > eventually search and use it. > Since the structure can change with different applications, and it has to > work with mult