From owner-freebsd-ruby@freebsd.org Sun Jan 10 18:36:14 2016 Return-Path: Delivered-To: freebsd-ruby@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 048EBA6A71A for ; Sun, 10 Jan 2016 18:36:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E42AC1E2C for ; Sun, 10 Jan 2016 18:36:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id E334EA6A719; Sun, 10 Jan 2016 18:36:13 +0000 (UTC) Delivered-To: ruby@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2D0FA6A716 for ; Sun, 10 Jan 2016 18:36:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3D831E2B for ; Sun, 10 Jan 2016 18:36:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u0AIaD55067499 for ; Sun, 10 Jan 2016 18:36:13 GMT (envelope-from bugzilla-noreply@freebsd.org) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: ruby@FreeBSD.org Subject: maintainer-feedback requested: [Bug 206108] lang/ruby21: fix setjmp clobbered variables (using clang 3.8.0 and optimizing for 'high' CPUs) Date: Sun, 10 Jan 2016 18:36:13 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ruby@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2016 18:36:14 -0000 Dimitry Andric has reassigned Bugzilla Automation 's request for maintainer-feedback to ruby@FreeBSD.or= g: Bug 206108: lang/ruby21: fix setjmp clobbered variables (using clang 3.8.0 = and optimizing for 'high' CPUs) https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206108 --- Description --- Created attachment 165369 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D165369&action= =3Dedit Mark several variables volatile so they won't have undefined state after setjmp() During my preparations for bug 206074 (exp-run for clang 3.8.0), I noticed = that lang/ruby21 would sometimes crash during the build. Specifically, on i386, with CPUTYPE=3Divybridge, you would get segfaults in miniruby. It turns out these are because there are several places in ruby where setjm= p() is used, and where not all variables accessed after setjmp() are marked volatile. This can cause them to have undefined state. Fix this by marking several variables in different functions volatile. These patches were obtained from NetBSD pkgsrc, thanks to J=C3=B6rg Sonnenb= erger for the hint.