unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
blob 52914c71a5b87d7daa21e3756cbd410fb29cab59 1286 bytes (raw)
name: gnu/packages/patches/go-1.4-fix-running-with-qemu.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 
Backport from upstream: https://github/golang/go/commit/2673f9ed

Original header:

From 2673f9ed23348c634f6331ee589d489e4d9c7a9b Mon Sep 17 00:00:00 2001
From: Austin Clements <austin@google.com>
Date: Wed, 12 Jul 2017 10:12:50 -0600
Subject: [PATCH] runtime: pass CLONE_SYSVSEM to clone

SysV semaphore undo lists should be shared by threads, just like
several other resources listed in cloneFlags. Currently we don't do
this, but it probably doesn't affect anything because 1) probably
nobody uses SysV semaphores from Go and 2) Go-created threads never
exit until the process does. Beyond being the right thing to do,
user-level QEMU requires this flag because it depends on glibc to
create new threads and glibc uses this flag.

Fixes #20763.

---
 src/runtime/os_linux.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/runtime/os_linux.c b/src/runtime/os_linux.c
index 0d8ffc9..573be7c 100644
--- a/src/runtime/os_linux.c
+++ b/src/runtime/os_linux.c
@@ -150,6 +150,7 @@ runtime·newosproc(M *mp, void *stk)
 		| CLONE_FS	/* share cwd, etc */
 		| CLONE_FILES	/* share fd table */
 		| CLONE_SIGHAND	/* share sig handler table */
+		| CLONE_SYSVSEM /* share SysV semaphore undo lists (see issue #20763) */
 		| CLONE_THREAD	/* revisit - okay for now */
 		;
 
-- 
2.31.1


debug log:

solving 52914c71a5 ...
found 52914c71a5 in https://yhetil.org/guix-bugs/86v939kxnz.fsf@mgsn.dev/

applying [1/1] https://yhetil.org/guix-bugs/86v939kxnz.fsf@mgsn.dev/
diff --git a/gnu/packages/patches/go-1.4-fix-running-with-qemu.patch b/gnu/packages/patches/go-1.4-fix-running-with-qemu.patch
new file mode 100644
index 0000000000..52914c71a5

1:35: space before tab in indent.
 		| CLONE_FS	/* share cwd, etc */
1:36: space before tab in indent.
 		| CLONE_FILES	/* share fd table */
1:37: space before tab in indent.
 		| CLONE_SIGHAND	/* share sig handler table */
1:39: space before tab in indent.
 		| CLONE_THREAD	/* revisit - okay for now */
1:40: space before tab in indent.
 		;
Checking patch gnu/packages/patches/go-1.4-fix-running-with-qemu.patch...
Applied patch gnu/packages/patches/go-1.4-fix-running-with-qemu.patch cleanly.
warning: squelched 3 whitespace errors
warning: 8 lines add whitespace errors.

index at:
100644 52914c71a5b87d7daa21e3756cbd410fb29cab59	gnu/packages/patches/go-1.4-fix-running-with-qemu.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).