aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-10-26 17:50:10 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-10-26 17:50:10 +0000
commit85c2f96c1cd3d1cbdbd20ad26f7d26dafbca087c (patch)
treede04d5291829d3f364a180607a01c072cc985bb6 /gcc/tree-sra.c
parent385710cf27e9a75c314993c21f44ed5ca50d4a6a (diff)
downloadgcc-85c2f96c1cd3d1cbdbd20ad26f7d26dafbca087c.zip
gcc-85c2f96c1cd3d1cbdbd20ad26f7d26dafbca087c.tar.gz
gcc-85c2f96c1cd3d1cbdbd20ad26f7d26dafbca087c.tar.bz2
syscall: fix creds_test to reliably close os.File
Uncovered by Uros Bizjak. Before this patch the test would close the file descriptor but not the os.File. When the os.File was GC'ed, the finalizer would close the file descriptor again. That would cause problems if the same file descriptor were returned by a later call to open in another test. On my system: > GOGC=30 go test --- FAIL: TestPassFD (0.04 seconds) passfd_test.go:62: FileConn: dup: bad file descriptor FAIL From-SVN: r192854
Diffstat (limited to 'gcc/tree-sra.c')
0 files changed, 0 insertions, 0 deletions