From: Ian Lance Taylor Date: Mon, 13 Jul 2015 18:55:33 +0000 (+0000) Subject: syscall: remove calls to Entersyscall & Exitsyscall in Getdents X-Git-Tag: releases/gcc-4.9.4~703 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37bf6227c280f7e944277af9cfba118f6c6c7d22;p=thirdparty%2Fgcc.git syscall: remove calls to Entersyscall & Exitsyscall in Getdents The syscall for Getdents in syscall/libcall_linux.go called Entersyscall and Exitsyscall, causing the runtime_sched counts for goroutines to be incorrect. Inconsistent counts caused checkdead in runtime/proc.c to panic. Fixes golang/go#11406 Reviewed-on: https://go-review.googlesource.com/11761 From-SVN: r225746 --- diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go index d5bedd06aac1..93137fc7fb72 100644 --- a/libgo/go/syscall/libcall_linux.go +++ b/libgo/go/syscall/libcall_linux.go @@ -223,7 +223,6 @@ func Getdents(fd int, buf []byte) (n int, err error) { } else { p = (*byte)(unsafe.Pointer(&_zero)) } - Entersyscall() s := SYS_GETDENTS64 if s == 0 { s = SYS_GETDENTS @@ -233,7 +232,6 @@ func Getdents(fd int, buf []byte) (n int, err error) { if n < 0 { err = errno } - Exitsyscall() return }