ccgo csmith tests randomly passsing/failing at ccgo/v3@eec51f76
At the moment pi64 builder reports a fail: https://modern-c.appspot.com/-/builder/?importpath=modernc.org%2fccgo. Yesterday it was also nuc64. I've manually cleared all Go caches, deleted all the downloaded code and the next round did pass again on nuc64.
It's inconclusive if it's the builder fault or a bug in libc. To help clarifying this, we need to add, guarded by the `libc.memgrind` tag, more memory accounting, like for example
- Balance of all `NewTLS` vs `TLS.Close` between `libc.Start` and `libc.exit`.
- ~~Balance of `TLS.Alloc` vs `TLS.Free` during the lifetime of a `TLS` instance.~~
- Balance of stack headers allocated vs stack headers freed during the lifetime of a `TLS` instance.
And teach builders to run a new pass of `$ go test -tags=libc.memgrind`, with properly selected tests. `TestCSmith` in ccgo is one of such.
Or maybe just adjust `TestCSmith` so it runs the Go version of the `csmith` generated program using the tag. That's much easier as the test uses `go run` to execute the Go code.
CC @amfiremage so you're aware of the concern.
PS: Builders are intentionally slow, they run at most three times a day, hence the lags.
issue