Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jan 2016 18:36:13 +0000
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)
Message-ID:  <bug-206108-21402-vbXzlizF77@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-206108-21402@https.bugs.freebsd.org/bugzilla/>
References:  <bug-206108-21402@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
Dimitry Andric <dim@FreeBSD.org> has reassigned Bugzilla Automation
<bugzilla@FreeBSD.org>'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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-206108-21402-vbXzlizF77>