• Akshat Kumar's avatar
    syscall: Plan 9: use lightweight errstr in entersyscall mode · a566deac
    Akshat Kumar authored
    Change 231af8ac63aa (CL 7314062) made runtime.enteryscall()
    set m->mcache = nil, which means that we can no longer use
    syscall.errstr in syscall.Syscall and syscall.Syscall6, since it
    requires a new buffer to be allocated for holding the error string.
    Instead, we use pre-allocated per-M storage to hold error strings
    from syscalls made while in entersyscall mode, and call
    runtime.findnull to calculate the lengths.
    
    Fixes #4994.
    
    R=rsc, rminnich, ality, dvyukov, rminnich, r
    CC=golang-dev
    https://golang.org/cl/7567043
    a566deac
asm_plan9_386.s 2.71 KB