1 // Copyright 2022 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.
5 // Stress test setgid and thread creation. A thread
6 // can get a SIGSETXID signal early on at thread
7 // initialization, causing crash. See issue 53374.
12 #include <sys/types.h>
22 func testSetgidStress(t *testing.T) {
24 ch := make(chan int, N)
25 for i := 0; i < N; i++ {
29 runtime.LockOSThread() // so every goroutine uses a new thread
32 for i := 0; i < N; i++ {