Re: [go-nuts] signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x7fcb5ae54390

2017-08-18 Thread Ian Lance Taylor
On Fri, Aug 18, 2017 at 5:36 PM, Justin Israel wrote: > > I have cgo code that looks like this in a few of my own libs and I just > started seeing crashes like this as of Go 1.8. Could it be related to the > need for using runtime.KeepAlive? I have been adding that to my

Re: [go-nuts] signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x7fcb5ae54390

2017-08-18 Thread Justin Israel
On Sat, Aug 19, 2017, 8:38 AM Ian Lance Taylor wrote: > On Fri, Aug 18, 2017 at 8:59 AM, Bhaskar Singhal > wrote: > > > > C function just copies the parameters passed. All of the params have > escaped > > to heap as seen in output generated by using

Re: [go-nuts] signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x7fcb5ae54390

2017-08-18 Thread Ian Lance Taylor
On Fri, Aug 18, 2017 at 8:59 AM, Bhaskar Singhal wrote: > > C function just copies the parameters passed. All of the params have escaped > to heap as seen in output generated by using -gcflags "-m -m" during build. > > I am trying to figure out if there is a possibility

Re: [go-nuts] signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x7fcb5ae54390

2017-08-18 Thread Bhaskar Singhal
C function just copies the parameters passed. All of the params have escaped to heap as seen in output generated by using -gcflags "-m -m" during build. I am trying to figure out if there is a possibility that gc frees any of these parameters before the C function call returns. On Fri, Aug 18,

Re: [go-nuts] signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x7fcb5ae54390

2017-08-18 Thread Ian Lance Taylor
On Fri, Aug 18, 2017 at 12:53 AM, Bhaskar Singhal wrote: > I am running into a seg fault. The code keeps crashing either due to > unexpected signal or double free. > > Any pointers on what I am doing wrong here: > > Code Snippet: > // Put puts the given key / value to