On Thu, Dec 1, 2016 at 4:47 PM, 'Florian Uekermann' via golang-nuts
<golang-nuts@googlegroups.com> wrote:
> I just had a fairly strange not reproducible panic. I have no idea whether
> this could be a go bug or if the C library I am using is buggy. In case it
> looks like a go bug I should probably post this on the issue tracker. Does
> anyone have an idea whether this is useful or if I should just forget about
> it? This is what the bug report would look like:
> I build and ran a go program whose code I unfortunately can't share. The
> program uses a go library called def (see stacktrace) which makes extensive
> use of cgo. The line where it panics "def/instance.go:353" contains only an
> assignment. The assignment is of the form *X.Y, where Y is a pointer to
> space on the C heap that is allocated in the previous line.

> ### Stacktrace
> runtime: writebarrierptr *0x7fbca8000960 = 0x1
> fatal error: bad pointer in write barrier

You wrote `*X.Y`; I'm going to assume you meant to write `*X = Y`.

This error message is telling you that in the assignment `*X = Y` Y
has a pointer type, but has the value 1.  If you allocated Y from the
C heap, then it sounds like your C allocation failed with NULL and
somewhere along the way something added 1.


You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to