mirror of
https://github.com/golang/go
synced 2024-11-18 05:14:43 -07:00
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/9953 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
f85a05581e
commit
7de86a1b1c
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user