Your message dated Sat, 04 Jan 2020 10:34:27 +0000
with message-id <e1inglh-000ie9...@fasolo.debian.org>
and subject line Bug#946709: fixed in gcc-9 9.2.1-22
has caused the Debian Bug report #946709,
regarding gcc-9: Backported upstream gccgo patch for hurd-i386
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
946709: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946709
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: gcc-9
Version: 9.2.1-1
Severity: important
Tags: patch

Hello,

gccgo patches for GNU/Hurd are now committed upstream for both gcc-9 and 
gcc-10. 
As found out by Samuel Thibault the current code in os_hurd.go use a relative
time instead of an absolute time, see 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92861

That bug is now fixed for gcc-10 upstream. However, for gcc-9 we need a patch to
fix also that problem. I've adapted the upstream commit to the attached file
gcc.git-fix-sem_timedwait.diff. A patch for debian/rules.patch is also attached.

Running the libgo testsuite for gcc-9-9.2.1-1 reveals that (almost) all timeout
failures are gone. The number of failing tests has decreased considerably:
(PASS/FAIL) = (158/26) -> (167/17).

Thanks!
--- a/src/libgo/go/runtime/os_hurd.go	2019-12-11 23:50:43.000000000 +0100
+++ b/src/libgo/go/runtime/os_hurd.go	2019-12-12 00:02:20.000000000 +0100
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// This file is derived from os_solaris.go.
+// This file is derived from os_aix.go.
 
 package runtime
 
@@ -31,6 +31,10 @@
 //extern sem_timedwait
 func sem_timedwait(sem *_sem_t, timeout *timespec) int32
 
+//go:noescape
+//extern clock_gettime
+func clock_gettime(clock_id int32, timeout *timespec) int32
+
 //go:nosplit
 func semacreate(mp *m) {
 	if mp.mos.waitsema != 0 {
@@ -54,8 +58,23 @@
 	_m_ := getg().m
 	if ns >= 0 {
 		var ts timespec
-		ts.set_sec(ns / 1000000000)
-		ts.set_nsec(int32(ns % 1000000000))
+
+		if clock_gettime(_CLOCK_REALTIME, &ts) != 0 {
+			throw("clock_gettime")
+		}
+
+		sec := int64(ts.tv_sec) + ns/1e9
+		nsec := int64(ts.tv_nsec) + ns%1e9
+		if nsec >= 1e9 {
+			sec++
+			nsec -= 1e9
+		}
+		if sec != int64(timespec_sec_t(sec)) {
+		// Handle overflows (timespec_sec_t is 32-bit in 32-bit applications)
+		sec = 1<<31 - 1
+		}
+		ts.tv_sec = timespec_sec_t(sec)
+		ts.tv_nsec = timespec_nsec_t(nsec)
 
 		if sem_timedwait((*_sem_t)(unsafe.Pointer(_m_.mos.waitsema)), &ts) != 0 {
 			err := errno()
--- a/debian/rules.patch	2019-11-25 15:31:24.000000000 +0100
+++ b/debian/rules.patch	2019-12-11 15:23:57.000000000 +0100
@@ -215,6 +215,7 @@
 
 ifeq ($(DEB_TARGET_ARCH_OS),hurd)
   debian_patches += hurd-changes
+  debian_patches += gcc.git-fix-sem_timedwait
 endif
 
 debian_patches += gcc-ice-dump

--- End Message ---
--- Begin Message ---
Source: gcc-9
Source-Version: 9.2.1-22

We believe that the bug you reported is fixed in the latest version of
gcc-9, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 946...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klose <d...@debian.org> (supplier of updated gcc-9 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 04 Jan 2020 10:43:48 +0100
Source: gcc-9
Architecture: source
Version: 9.2.1-22
Distribution: unstable
Urgency: medium
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Changed-By: Matthias Klose <d...@debian.org>
Closes: 946487 946709 946792
Changes:
 gcc-9 (9.2.1-22) unstable; urgency=medium
 .
   * Update to SVN 20200104 (r279880) from the gcc-9-branch.
     - Fix PR libstdc++/92853, PR target/92098 (PPC), PR libstdc++/91786,
       PR tree-optimization/91790, PR c++/57082, PR c++/92859, PR c++/92446,
       PR c++/92150, PR fortran/92898, PR fortran/92897, PR fortran/92899,
       PR c++/60228, PR sanitizer/92154, PR c++/61414, PR c/90677,
       PR target/67834 (PA), PR target/93111 (PA), PR fortran/92756,
       PR ipa/92357, PR tree-optimization/92930, PR target/92904 (X86),
       PR target/92723, PR debug/92664, PR tree-optimization/92644,
       PR target/92615 (X86), PR rtl-optimization/92591, PR target/92545 (AVR),
       PR target/92950 (S390), PR c/90677, PR c++/92831, PR c++/92732,
       PR c++/92695, PR c++/92695, PR c++/60228, PR c++/92695, PR c++/92524,
       PR c++/92648, PR c++/61414, PR c/90677, PR c++/90842, PR fortran/92961,
       PR fortran/92753, PR fortran/92977, PR fortran/92977, PR fortran/92899,
       PR fortran/92775, PR fortran/92781, PR fortran/91944.
   * libgomp-plugin-nvptx1: Update cuda suggestions. Closes: #946487.
   * Fix buffer overflow in the gcc-search-prefixed-as-ld patch. Closes: 
#946792.
   * Backport gccgo patch for hurd-i386 (Svante Signell). Closes: #946709.
Checksums-Sha1:
 4acdbbbc22b4dafbe9fbcfdecdf1dd0450189f1c 27011 gcc-9_9.2.1-22.dsc
 c98a444fa60746affb08bf41acbc14cd7e95a43a 921484 gcc-9_9.2.1-22.debian.tar.xz
 00b883c877865a6cd2ab4f11556f1dcbae67b448 10217 gcc-9_9.2.1-22_source.buildinfo
Checksums-Sha256:
 32f9d8bbfe6684a883417b272dba99f4d35e2facfdffcf122e4dbc9c152e578f 27011 
gcc-9_9.2.1-22.dsc
 760174cd62f776bc10ce87ad71e6ce40159221b1f1c71b389904c93f854ef66a 921484 
gcc-9_9.2.1-22.debian.tar.xz
 8119ceb4c0f6843406b89f1116388654fd7e64705429d70835729f492d7cd46f 10217 
gcc-9_9.2.1-22_source.buildinfo
Files:
 11ff0e5d73dfa27548295d7dbef26df5 27011 devel optional gcc-9_9.2.1-22.dsc
 713a6a510ed417a59b0cde02870dc10a 921484 devel optional 
gcc-9_9.2.1-22.debian.tar.xz
 e4447339be8a5cf3c8cb0eb09beda2de 10217 devel optional 
gcc-9_9.2.1-22_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCAAuFiEE1WVxuIqLuvFAv2PWvX6qYHePpvUFAl4QZDEQHGRva29AZGVi
aWFuLm9yZwAKCRC9fqpgd4+m9VsHD/9o9xryKSBqTUiAYxrKCaYWp7q4fR65Ud2A
2e5v3IcvjD+y+y5bA/tnrGVx6SP66H92ThPbvE5yzttV0Q9RhD4HgwHAai/ox672
HGmKgxNjh4mzhh9G9lwWCBJdZPEcbh45/vpg5MuZVYJJ+6AVm9zKi4WsJVTzvBl6
voma9U0bxblt/gVa5jkgDAYfQB4gIbLFdyKAc/dXh2j7rUoy72QPhm1ey/sByfxU
gJ6U/Z69su7SqSBrb8epAAcYBe9tB80pu9Ob43yoDwBRK+8MS0/onuiE0KQvHJHp
ASxbW43GClg18xsfzPigY/v63MneNqxtZz6c/Kfu7HU61JJK0wsVwdU4iJQwUBtK
Vg0QUVjIPongfjWwKsGZdd/BYIUhtbwS9txiw+ISwGg725kCEAZdvq7KmEoS1tem
ERg9trCn35O/CfZ/IMBycvjGc+7Al+p/jmEyT0c0VNP+d++wXZTWpmzTJcZTfWgm
QZmyfrTZdlFQcgyYzXh2mp+VhPf3vzpce6aM1r0GFF6BGUFof/ELKFtePPoBMVIE
VbIkomGck/bu7xB8NuQQw9nY5dYK80+uhzNEoOz2yPmVD/nEyt/oW8H8u7CX3R4B
sELVsiyw6h7AWx2TNC2nYyXW6hf7TZICaGGV/zRlXD9bi+rJ+YjvAp9GJliCEaTg
yHh2NMV/eA==
=OKPZ
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to