1 // Copyright 2016 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 // Check that calls to C.malloc/C.free do not trigger TSAN false
10 // #cgo CFLAGS: -fsanitize=thread
11 // #cgo LDFLAGS: -fsanitize=thread
12 // #include <stdlib.h>
22 for i := 0; i < 10; i++ {
26 for i := 0; i < 100; i++ {
27 p := C.malloc(C.size_t(i * 10))