golang/go

runtime/cgo: panic from callbacks does not work with -fsanitize=address/thread

Open

#16,150 opened on Jun 22, 2016

View on GitHub
 (22 comments) (0 reactions) (0 assignees)Go (19,008 forks)batch import
NeedsFixhelp wanted

Repository metrics

Stars
 (133,883 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Version: go1.6 darwin/amd64

==976==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff5fbfefb1 at pc 0x00000573e1bb bp 0x7fff5fbfef10 sp 0x7fff5fbfe6c0
WRITE of size 5 at 0x7fff5fbfefb1 thread T0

As far as I can tell, this is all that's happening:

In go,

msg := C.String("fixme")

In c++,

std::string str(msg);

But maybe I'm missing something obvious.

Have a look, https://travis-ci.org/keroserene/go-webrtc/jobs/139389584

I've only been able to reproduce this w/ clang.

/cc @dvyukov

Contributor guide