Commit 7de86a1b authored by David du Colombier's avatar David du Colombier

runtime: terminate exit status buffer on Plan 9

The status buffer built by the exit function
was not nil-terminated.

Fixes #10789.

Change-Id: I2d34ac50a19d138176c4b47393497ba7070d5b61
Reviewed-on: https://go-review.googlesource.com/9953Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
parent f85a0558
......@@ -177,7 +177,7 @@ func exit(e int) {
} else {
// build error string
var tmp [32]byte
status = []byte(gostringnocopy(&itoa(tmp[:len(tmp)-1], uint64(e))[0]))
status = append(itoa(tmp[:len(tmp)-1], uint64(e)), 0)
}
goexitsall(&status[0])
exits(&status[0])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment