-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Milestone
Description
The leak was reported internally on a sever canary that runs for days.
After a day server consumes 5.6GB, after 6 days -- 12.2GB.
The leak is exposed by the following benchmark:
func BenchmarkStackLeak(b *testing.B) {
done := make(chan bool, 1)
for i := 0; i < b.N; i++ {
go func() {
growStack(rand.Intn(100))
done <- true
}()
<-done
}
}
func growStack(i int) {
if i == 0 {
return
}
growStack(i - 1)
}The leak is fixed upstream in :
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc?view=diff&r1=276102&r2=276103&pathrev=276103