From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 66438139082 for ; Mon, 27 Nov 2017 12:47:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 96D2AE0CAB; Mon, 27 Nov 2017 12:47:44 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 676CEE0CAB for ; Mon, 27 Nov 2017 12:47:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C89E633BEC7 for ; Mon, 27 Nov 2017 12:47:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6A40DA950 for ; Mon, 27 Nov 2017 12:47:41 +0000 (UTC) From: "Amy Liffey" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Amy Liffey" Message-ID: <1511786833.182b1b496f7535bee46bba54544fa3e567be2beb.amynka@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-scheme/guile/, dev-scheme/guile/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-scheme/guile/Manifest dev-scheme/guile/files/guile-2.0.14-ia64-fix-crash-thread-context-switch.patch dev-scheme/guile/guile-2.0.14-r2.ebuild dev-scheme/guile/guile-2.0.14-r3.ebuild X-VCS-Directories: dev-scheme/guile/ dev-scheme/guile/files/ X-VCS-Committer: amynka X-VCS-Committer-Name: Amy Liffey X-VCS-Revision: 182b1b496f7535bee46bba54544fa3e567be2beb X-VCS-Branch: master Date: Mon, 27 Nov 2017 12:47:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1740d999-caf9-4099-8da3-01ff39c5ea17 X-Archives-Hash: afde36e3d5c2e919677b01d521a6956c commit: 182b1b496f7535bee46bba54544fa3e567be2beb Author: Amy Liffey gentoo org> AuthorDate: Mon Nov 27 12:44:50 2017 +0000 Commit: Amy Liffey gentoo org> CommitDate: Mon Nov 27 12:47:13 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=182b1b49 dev-scheme/guile: fix ia64 segmentation fault Closes: https://bugs.gentoo.org/613986 Package-Manager: Portage-2.3.13, Repoman-2.3.3 dev-scheme/guile/Manifest | 2 +- ...0.14-ia64-fix-crash-thread-context-switch.patch | 63 ++++++++++++++++++++++ ...ile-2.0.14-r2.ebuild => guile-2.0.14-r3.ebuild} | 1 + 3 files changed, 65 insertions(+), 1 deletion(-) diff --git a/dev-scheme/guile/Manifest b/dev-scheme/guile/Manifest index de6ab3b87ea..91a787d19b7 100644 --- a/dev-scheme/guile/Manifest +++ b/dev-scheme/guile/Manifest @@ -1,3 +1,3 @@ DIST guile-1.8.8.tar.gz 3956654 SHA256 c3471fed2e72e5b04ad133bbaaf16369e8360283679bcf19800bc1b381024050 SHA512 ede6feb90cd419d8763feb8c5169275490a653919573c4dfced025b74cf591072b3a10ffb9a3f6ee3fe7b0a0956ffcf434e0859b421455c8349cea56bf427db0 WHIRLPOOL 104810030b5dae16805595a5b398e5a7e600771b64b08d5ff686036e2f273dcec3829a16e4cdb1dbb9db5813f2e225476f83e0535a789bc570fc2fc15a76dbe2 DIST guile-2.0.13.tar.gz 7808173 SHA256 ee8073c4582bb4f06412452fdf5dd185aae607441f1313c824f44bdd668b0bde SHA512 79fd5fda5064331eb687934ec3eaf07943f5b23bd05fbce23ab5ee3698864250b33746e33b8f074692b56f7b428dac42ed5d3f5b9dc17d171aa6dfadc1625b00 WHIRLPOOL 5f8b8e0f0e5fd2cde8fd4b1ca89ebe0231dd5f746945d71412a9d1ce57094013882972d9791511ef47e9bf1f2e9eff77a515dab8b4a6c0316122cb9ef49b5a7d -DIST guile-2.0.14.tar.gz 7823099 SHA256 8aeb2f353881282fe01694cce76bb72f7ffdd296a12c7a1a39255c27b0dfe5f1 SHA512 d69c9bdf589fedcc227f3203012f6ed11c327cef3a0147d8e016fe276abecdb4272625efe1d0c7aa68219fe8f29bbced44089a4b479e4eafe01976c6b2b83633 WHIRLPOOL 3b355f40b47c940bf9330a3521447efd2da7c7c9c3615c208513e36fec937c06a9f307fb2c59d652c09e6e0e13e858d7ef7949efbe32d530431a7aace3d9a165 +DIST guile-2.0.14.tar.gz 7823099 BLAKE2B e7fa5a4ca19dc4adfcc151350b0ed4e211b8470b0d12f65451697a818c3139a4a5992a019bd213114748230cb15ec755d1af70d42b901230854915c0ee7b05de SHA512 d69c9bdf589fedcc227f3203012f6ed11c327cef3a0147d8e016fe276abecdb4272625efe1d0c7aa68219fe8f29bbced44089a4b479e4eafe01976c6b2b83633 diff --git a/dev-scheme/guile/files/guile-2.0.14-ia64-fix-crash-thread-context-switch.patch b/dev-scheme/guile/files/guile-2.0.14-ia64-fix-crash-thread-context-switch.patch new file mode 100644 index 00000000000..c2f136ddd10 --- /dev/null +++ b/dev-scheme/guile/files/guile-2.0.14-ia64-fix-crash-thread-context-switch.patch @@ -0,0 +1,63 @@ +From f92888853439a8ded221f3423865c78de2a96a14 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Sun, 5 Nov 2017 09:30:45 +0000 +Subject: ia64: Fix crash in thread context switch. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes and . + +Backtrace looks like that: + + Program terminated with signal SIGSEGV, Segmentation fault. + #0 0x200000000014a5c0 in scm_ia64_longjmp (JB=0x6000000000817020, VAL=1) at continuations.c:372 + 372 t->pending_rbs_continuation->backing_store, + [Current thread is 1 (Thread 0x2000000000049340 (LWP 8190))] + (gdb) bt + #0 0x200000000014a5c0 in scm_ia64_longjmp (JB=0x6000000000817020, VAL=1) at continuations.c:372 + #1 0x2000000000148e00 in scm_c_abort (vm=0x60000000000edea0, tag=0x6000000000795ba0, n=0, argv=0x60000fffff7f0ce0, cookie=-1) at control.c:239 + #2 0x2000000000149070 in scm_at_abort (tag=0x6000000000795ba0, args=0x304) at control.c:258 + (gdb) print t + $2 = (scm_i_thread *) 0x6000000000068000 + (gdb) print t->pending_rbs_continuation + $3 = (scm_t_contregs *) 0xffeb + +The problem here is the value of 't->pending_rbs_continuation' pointer. +It's supposed to poin to a register stack pointer or be NULL if not yet +backed up. + +The problem is it is never initialized to NULL at creation time and +contained garbage on stack. Sometimes people are lucky and have zeros +on stack and guile works. But sometimes there is something and guile +crashes. + +The fix is trivial: initialize 'pending_rbs_continuation = NULL' +at thread registration time (the same way other threads are registered). + +Reported-by: Matt Turner + +* libguile/threads.c (guilify_self_1): Initialize pending_rbs_continuation +to avoid crash on ia64. + +Signed-off-by: Sergei Trofimovich +Signed-off-by: Ludovic Courtès +--- + libguile/threads.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libguile/threads.c b/libguile/threads.c +index 9ceb5b8..770f62c 100644 +--- a/libguile/threads.c ++++ b/libguile/threads.c +@@ -395,6 +395,7 @@ guilify_self_1 (struct GC_stack_base *base, int needs_unregister) + t.base = base->mem_base; + #ifdef __ia64__ + t.register_backing_store_base = base->reg_base; ++ t.pending_rbs_continuation = 0; + #endif + t.continuation_root = SCM_EOL; + t.continuation_base = t.base; +-- +cgit v1.0-41-gc330 + diff --git a/dev-scheme/guile/guile-2.0.14-r2.ebuild b/dev-scheme/guile/guile-2.0.14-r3.ebuild similarity index 97% rename from dev-scheme/guile/guile-2.0.14-r2.ebuild rename to dev-scheme/guile/guile-2.0.14-r3.ebuild index 37a3cd3ede7..56165f81bcb 100644 --- a/dev-scheme/guile/guile-2.0.14-r2.ebuild +++ b/dev-scheme/guile/guile-2.0.14-r3.ebuild @@ -37,6 +37,7 @@ DOCS=( GUILE-VERSION HACKING README ) PATCHES=( "${FILESDIR}/${PN}-2-snarf.patch" "${FILESDIR}/${P}-darwin.patch" + "${FILESDIR}/${P}-ia64-fix-crash-thread-context-switch.patch" ) src_prepare() {