]> Cypherpunks repositories - gostls13.git/commit
runtime: in __tsan_fini tell scheduler we are entering non-Go code
authorIan Lance Taylor <iant@golang.org>
Wed, 19 Apr 2023 21:16:37 +0000 (14:16 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 21 Apr 2023 21:26:05 +0000 (21:26 +0000)
commit30886390c2a59a24c23229f434453ca9ae247962
tree92ef879c68d1ef38d68f12d105da61eaf3d7b70d
parentcedf5008a84d3726f98fac551a4016bf0a91157f
runtime: in __tsan_fini tell scheduler we are entering non-Go code

__tsan_fini will call exit which will call destructors which
may in principle call back into Go functions. Prepare the scheduler
by calling entersyscall before __tsan_fini.

Fixes #59711

Change-Id: Ic4df8fba3014bafa516739408ccfc30aba4f22ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/486615
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
src/runtime/crash_cgo_test.go
src/runtime/race.go
src/runtime/testdata/testprogcgo/destructor.c [new file with mode: 0644]
src/runtime/testdata/testprogcgo/destructor.go [new file with mode: 0644]