[#21709] [Feature #1084] request for: Array#sort_by! — Radosław Bułat <redmine@...>
Feature #1084: request for: Array#sort_by!
Hi,
Issue #1084 has been updated by Yukihiro Matsumoto.
Excerpts from Henri Suur-Inkeroinen's message of Mon Feb 02 12:46:52 +0200 2009:
Eero Saynatkari wrote:
Excerpts from Kornelius Kalnbach's message of Mon Feb 02 13:32:33 +0200 2009:
Eero Saynatkari wrote:
[#21714] [BUG:trunk] Got the error message, after run 'gem install --test'. — Takao Kouji <kouji@...7.net>
Hi, Ryan.
Issue #1085 has been updated by Yusuke Endoh.
[#21715] New documentation system! — Luiz Vitor Martinez Cardoso <grabber@...>
People,
On Sun, Feb 1, 2009 at 10:51 AM, Luiz Vitor Martinez Cardoso
Quoting Austin Ziegler <halostatue@gmail.com>:
People,
One project that has been in the works for a while and shows a lot of
I'd love to see a documentation system similar to what python has, and
People,
Luiz Vitor Martinez Cardoso wrote:
=20
On Mon, Feb 2, 2009 at 10:31 AM, Berger, Daniel <Daniel.Berger@qwest.com> wrote:
On Mon, Feb 02, 2009 at 12:51:54AM +0900, Luiz Vitor Martinez Cardoso wrote:
> I like docstrings. I like being able to type "help(foo)" in python and
2009/2/14 Roger Pack <rogerdpack@gmail.com>:
> irb(main):002:0> help "String#chars"
[#21737] [Feature #1089] Stable sorting for sort and sort_by — Kornelius Kalnbach <redmine@...>
Feature #1089: Stable sorting for sort and sort_by
Kornelius Kalnbach wrote:
[#21747] [Bug #1090] zlib doesn't load after installation — Jérôme Bousquié <redmine@...>
Bug #1090: zlib doesn't load after installation
[#21762] [Bug #1091] possible bad handling of return value of OCSP_basic_verify in ext/openssl/ossl_ocsp.c — Lucas Nussbaum <redmine@...>
Bug #1091: possible bad handling of return value of OCSP_basic_verify in ext/openssl/ossl_ocsp.c
[#21764] ruby 1.9.1 in mingw - how to remove "-s" argument from gcc linking — Tim Elliott <tle@...>
I want to use gdb to debug an application that embeds the ruby dll.
Hi,
[#21802] [Bug #1098] Unclear encoding error: #<Encoding::UndefinedConversionError: "\xE2\x96\x80" from UTF-8 to ISO-8859-1 in conversion from CP850 to ISO-8859-1> — Tom Link <redmine@...>
Bug #1098: Unclear encoding error: #<Encoding::UndefinedConversionError: "\xE2\x96\x80" from UTF-8 to ISO-8859-1 in conversion from CP850 to ISO-8859-1>
[#21812] 1.9 Bug Report — Yehuda Katz <wycats@...>
When going through the RubySpecs for 1.9, I found that the following code
[#21822] [Feature #1102] Prepend Module — Thomas Sawyer <redmine@...>
Feature #1102: Prepend Module
[#21838] What does this regexp mean - /\c#{_J}/ — Shri Borde <Shri.Borde@...>
I am combining the escaped control character syntax (\cX) with variable int=
QWN0dWFsbHksIHdpdGggc3RyaW5ncywgdGhlIHJlZ2V4cCBpcyBldmFsdWF0ZWQgYXQgdGhlIHZl
[#21842] Regexp interpolation does not give equality — Shri Borde <Shri.Borde@...>
Any idea why the second expression results in false? Its seems like both th=
[#21855] [Bug #1113] Compilation fails on Ubuntu 8.10, 64 bit — Jacques Lemire <redmine@...>
Bug #1113: Compilation fails on Ubuntu 8.10, 64 bit
[#21880] [Bug #1117] Array#choice always produces the same sequence — Stefano Crocco <redmine@...>
Bug #1117: Array#choice always produces the same sequence
[#21884] [Bug #1118] irb core dumps with 'CTRL-C' with zsh — Emiel van de Laar <redmine@...>
Bug #1118: irb core dumps with 'CTRL-C' with zsh
[#21886] mule-utf-8 — Roman Shterenzon <romanbsd@...>
[#21893] [Feature #1122] request for: Object#try — Narihiro Nakamura <redmine@...>
Feature #1122: request for: Object#try
Hi,
Hi --
Hi,
Hi--
Hi,
Hi --
Providing new syntax change for such a small thing is IMHO
Count me in as a +1 on foo.?bar(baz). I'm on the fence about whether ?bar
2009/2/15 Yehuda Katz <wycats@gmail.com>:
> IMHO, foo.?bar should behave as "call-except-if-nil". Not only it
On Wed, Feb 18, 2009 at 6:29 PM, Roger Pack <rogerdpack@gmail.com> wrote:
> Then how it is different from
Roger Pack wrote:
>>> Then how it is different from
Roger Pack wrote:
On Wed, Feb 18, 2009 at 2:35 PM, Joel VanderWerf
Roger Pack wrote:
2009/2/19 Joel VanderWerf <vjoel@path.berkeley.edu>:
[#21903] [Bug #1127] error while compiling Win32API under MinGW — Luis Lavena <redmine@...>
Bug #1127: error while compiling Win32API under MinGW
[#21904] 1.9 one-byte trace instruction and trap-instruction replacement? — Rocky Bernstein <rocky.bernstein@...>
Now that Ruby 1.9.1 has been released, if I recall correctly a
[#21937] [Bug #1131] String#unpack("V") does not work correctly is linux on s390x — Ittay Dror <redmine@...>
Bug #1131: String#unpack("V") does not work correctly is linux on s390x
Issue #1131 has been updated by Marcus R端ckert.
[#21944] [Bug #1134] [PATCH] Update racc runtime and fix warnings — Aaron Patterson <redmine@...>
Bug #1134: [PATCH] Update racc runtime and fix warnings
[#21946] New hash : syntax for the 1.8 series? — Brent Roman <brent@...>
At Tue, 10 Feb 2009 16:30:55 +0900,
Hi --
David A. Black wrote:
At Tue, 10 Feb 2009 22:32:19 +0900,
Hi,
On Wed, Feb 11, 2009 at 9:55 AM, Yukihiro Matsumoto <matz@ruby-lang.org> wr=
2009/2/11 Rados=B3aw Bu=B3at <radek.bulat@gmail.com>:
2009/2/11 Pit Capitain <pit.capitain@gmail.com>:
[#21958] ruby 1.9.1 parallel make race — Andrew Walrond <andrew@...>
Hello list,
[#21997] 1.8.7 Specifics — John Barnette <jbarnette@...>
There's a fair amount of talk lately about release management and
On Wednesday 11 of February 2009 19:42:37 John Barnette wrote:
At Mon, 23 Feb 2009 02:48:51 +0900,
On Wed, Feb 11, 2009 at 1:42 PM, John Barnette <jbarnette@gmail.com> wrote:
On Thu, Feb 12, 2009 at 04:01:58AM +0900, Gregory Brown wrote:
On Wed, Feb 11, 2009 at 6:28 PM, Aaron Patterson
Gregory Brown wrote:
On Wed, Feb 11, 2009 at 4:42 PM, John Barnette <jbarnette@gmail.com> wrote:
Luis Lavena wrote:
On Wed, Feb 11, 2009 at 5:55 PM, Charles Oliver Nutter
2009/2/11 Luis Lavena <luislavena@gmail.com>:
Hi,
Hi,
Hello Ezra,
Let me leave a memo to remember issues I can think of.
Urabe Shyouhei wrote:
Charles Oliver Nutter wrote:
Excerpts from Headius: Charles Oliver Nutter's message of Sat Feb 14 00:53:17 +0200 2009:
Brent Roman wrote:
Eero Saynatkari wrote:
Excerpts from Headius: Charles Oliver Nutter's message of Sat Feb 14 20:49:52 +0200 2009:
Charles Oliver Nutter wrote:
Ezra Zygmuntowicz wrote:
Hi,
Brent Roman wrote:
Brent Roman wrote:
Charles Oliver Nutter wrote:
Hongli Lai wrote:
On 11/02/2009, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
All,
On 12/02/2009, John Barnette <jbarnette@gmail.com> wrote:
[#22040] [Bug #1151] Aliased methods change super logic when retrieved with Object#method — Charles Nutter <redmine@...>
Bug #1151: Aliased methods change super logic when retrieved with Object#method
[#22058] [Bug #1157] missing zlib.rb? — Fred Obermann <redmine@...>
Bug #1157: missing zlib.rb?
[#22065] Dir.glob and duplicates? — Charles Oliver Nutter <charles.nutter@...>
I was fixing a JRuby Dir.glob spec failure where we produced a duplicate
Hi,
Nobuyoshi Nakada wrote:
Ryan Davis wrote:
In article <4996749D.7050009@sun.com>,
Tanaka Akira wrote:
In article <49967AFC.4040006@sun.com>,
Tanaka Akira wrote:
In article <49967EC7.6080105@sun.com>,
Tanaka Akira wrote:
In article <49971135.3020009@sun.com>,
Tanaka Akira wrote:
[#22116] [Bug #1162] Build Assertion Failure with VC+++ - Incorrect flushing of stdout/stderr — Charlie Savage <redmine@...>
Bug #1162: Build Assertion Failure with VC+++ - Incorrect flushing of stdout/stderr
[#22136] Confused about some code in mathn.rb — Charles Oliver Nutter <charles.nutter@...>
In 1.8.6 and 1.8.7, these lines appear at line 202 in mathn.rb:
[#22142] [Patch 191p0 ] for ostruct freeze behavior — Robert Dober <robert.dober@...>
Please find attached a patch for ostruct to behave frozen for already
Robert Dober wrote:
On Sun, Feb 15, 2009 at 8:15 PM, Joel VanderWerf
On Sun, Feb 15, 2009 at 9:30 PM, Robert Dober <robert.dober@gmail.com> wrote:
Do I have to file a bug report?
[#22184] [Bug #1164] 1.9/windows memroy leak with rand() AND inspect — "regis d'aubarede" <redmine@...>
Bug #1164: 1.9/windows memroy leak with rand() AND inspect
[#22206] ruby-1.9.1-p0 build failure on i586 — "Jeroen van Meeuwen (Fedora Project)" <kanarip@...>
Hi there,
> However, I get a i586 build failure:
Roger Pack wrote:
[#22246] YASNP (Yet Another Selector Namespace Proposal) — Yehuda Katz <wycats@...>
The idea is to make selectors like optional versions of Python imports.
Yehuda Katz wrote:
Charles Oliver Nutter wrote:
2009/2/19 Florian Gilcher <flo@andersground.net>
Ok, based on a bunch of comments I got from Aaron Patterson and John
On Feb 20, 2009, at 8:39 AM, Yehuda Katz wrote:
On Sun, Feb 22, 2009 at 04:34:18AM +0900, Jim Weirich wrote:
Excerpts from Aaron Patterson's message of Sun Feb 22 04:35:41 +0200 2009:
=20
Can you explain *why* you don't like it?
Excerpts from Yehuda Katz's message of Mon Feb 23 18:08:29 +0200 2009:
Hi,
Yukihiro Matsumoto wrote:
On Feb 24, 2:07=A0am, Yukihiro Matsumoto <m...@ruby-lang.org> wrote:
Excerpts from brixen's message of Wed Feb 25 00:04:34 +0200 2009:
2009/2/24 Eero Saynatkari <ruby-ml@kittensoft.org>
On Feb 24, 3:17=A0pm, Yehuda Katz <wyc...@gmail.com> wrote:
2009/2/24 Brian Ford <brixen@gmail.com>
I agree that this will be used in ways other than just framework creators. =
I'm also in favor of discussing this, but all I hear so far in opposition is
Florian Gilcher wrote:
On Feb 24, 9:17=A0pm, Yehuda Katz <wyc...@gmail.com> wrote:
On Wed, Feb 25, 2009 at 9:23 AM, Brian Ford <brixen@gmail.com> wrote:
Yehuda, I wonder on one thing. If you want in your framework/library
I thought I'd sent this before...hopefully it's still relevant.
Yehuda Katz wrote:
Yehuda Katz wrote:
Hi,
Yukihiro Matsumoto wrote:
Ola Bini wrote:
Charles Oliver Nutter wrote:
Ola Bini wrote:
2009/2/25 Gary Wright <gwtmp01@mac.com>
On Feb 25, 2009, at 6:45 PM, Yehuda Katz wrote:
Jim Weirich wrote:
Jim Weirich wrote:
[#22269] [Bug #1181] [BUG] thread_free: keeping_mutexes must be NULL — Chris Schlaeger <redmine@...>
Bug #1181: [BUG] thread_free: keeping_mutexes must be NULL
[#22286] [Backport #1183] Adding support for the new hash literal syntax — Akinori MUSHA <redmine@...>
Backport #1183: Adding support for the new hash literal syntax
Hi,
[#22325] suggestions for float — Roger Pack <rogerdpack@...>
Floating point rounding errors are common and "annoying"
On Sat, Feb 21, 2009 at 11:59 PM, Roger Pack <rogerdpack@gmail.com> wrote:
Hi,
Excerpts from Yukihiro Matsumoto's message of Mon Mar 02 12:46:27 +0200 2009:
Excerpts from Kurt Stephens's message of Mon Mar 02 20:27:09 +0200 2009:
>> There is public-domain C code that formats floating-point values as the
> A variant of the float to string conversion that tries to preserve all th=
Brent Roman wrote:
[#22333] [Feature #1193] Justified Error Messages — Simon Chiang <redmine@...>
Feature #1193: Justified Error Messages
[#22336] Floats are freezeable and taintable? — Charles Oliver Nutter <charles.nutter@...>
In adding an optimization for Float I realized that Float objects are
Yes, that would be desirable, if there's not a good reason they aren't
At 09:19 09/02/23, Charles Oliver Nutter wrote:
Hi,
[#22347] On the consideration of macros — "James M. Lawrence" <quixoticsycophant@...>
In a previous thread Charles Oliver Nutter had suggested the removal
[#22353] [Bug #1195] String#% does not include prefix before zero value for # versions of numeric formats — Charles Nutter <redmine@...>
Bug #1195: String#% does not include prefix before zero value for # versions of numeric formats
In article <49a25ec0ce233_84c7e8c1f8909a@redmine.ruby-lang.org>,
Tanaka Akira wrote:
At Tue, 24 Feb 2009 14:16:53 +0900,
Akinori MUSHA wrote:
Hi,
Yukihiro Matsumoto wrote:
[#22365] Surprising behavior in inheritance — Nikolai Weibull <now@...>
Am I the only one surprised by this behavior?
Excerpts from Nikolai Weibull's message of Mon Feb 23 16:53:26 +0200 2009:
[#22383] Proposal: Integer.digit_count — Varun Gupta <thevarungupta@...>
How about having a method to return number of digits in the Integer?
[#22418] [Question]utf-8 data contains BOM - by intention or by accident? — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>
Hi!
I think this has been asked earlier, and I can only repeat it here:
Martin Duerst schrieb:
Hi,
[#22543] [Feature #1218] New method needed to set and get the current recursion limit — Conrad Taylor <redmine@...>
Feature #1218: New method needed to set and get the current recursion limit
Issue #1218 has been updated by Conrad Taylor.
[#22559] [Bug #1219] ostruct freeze still not stable — Robert Dober <redmine@...>
Bug #1219: ostruct freeze still not stable
[#22584] MBARI8 patch fixes bugs caused by incorrect volatile variable declarations — Brent Roman <brent@...>
Hi,
In article <49a9024b.0e0d6e0a.11f5.ffffee2f@mx.google.com>,
I am having an issue with the MBARI patches. In our app the test suite has a
a back trace and ruby -v would be nice.
by back trace do you mean the output of
gdb -core core
[#22597] [Bug #1227] [BUG] object allocation during garbage collection phase — Chris Schlaeger <redmine@...>
Bug #1227: [BUG] object allocation during garbage collection phase
[ruby-core:22584] MBARI8 patch fixes bugs caused by incorrect volatile variable declarations
Much of this is excerpted from updates at:
http://sites.google.com/site/brentsrubypatches/
I believe I discovered two latent MRI bugs that had been unearthed by my
factoring of rb_eval() into separate eval functions for each node type (in
MBARI 4). This was all done in the course of determining why the MBARI7
patch set, while very solid on x86-32, was segfaulting on x86-64 CPUs.
First:
The function evaluating a string literal node would, in some cases, pass the
internal pointer of a newly created ruby string object into rb_reg_new(),
which would derive a new regular expression object from it. Trouble was,
gcc, when optimizing on a machine like the x86-64, would determine that the
pointer to the newly created string object need not be stacked and in fact
could be entirely "forgotten" as soon its text buffer was passed into
rb_reg_new(). Nothing wrong with that... unless a GC pass happened to be
triggered while deriving the new regular expression from that string
object's internal text buffer. In which case, that now unreferenced String
object would never be marked and, as a result, that String and its text
buffer would be prematurely freed, trashing the regular expression pattern,
resulting in very occasional regex match failures and (very rare) heap
corruption.
The best test case I came up with for this first bug was:
$ ruby -e "GC.stress=true; load 'test/pathtest/test_pathtest.rb'"
Lots of test failures with MBARI 7 (only on x86-64), all passed with MBARI
8
The RB_GC_GUARD() macro introduced in 1.8.7 works nicely to prevent this
sort of problem:
+ RB_GC_GUARD(str); /* prevent tail call optimization here */
return str2;
case NODE_DREGX_ONCE: /* regexp expand once */
str2 = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
node->nd_cflag);
nd_set_type(node, NODE_LIT);
+ RB_GC_GUARD(str); /* ensure str is not GC'd in rb_reg_new */
return node->nd_lit = str2;
Second:
eval.c is full of setjmp()s and longjmp() calls. These are error prone
constructs for a number reasons. The most insidious of which is the fact
that the 'C' spec does not require that non-volatile local variables in the
function containing a setjmp() be preserved when it returns via longjmp().
A few of the unpatched functions containing EXEC_TAG() in eval.c missed this
point, failing to declare as 'volatile' variables that might need to be
preserved on the stack in exceptional cases (redo clauses in some contexts,
for example). And, many variables were declared volatile that did not need
to be, adding to the confusion. This coding rule is difficult to maintain
during incremental development, even if one follows it properly in the first
place. I added a few such errors of my own with MBARI4, because I did not
fully understand the volatile qualifier in this context and tried to follow
the "patterns" I saw in the existing code. The volatile qualifier here is
to prevent variables from being cached in registers. So, of course, CPUs
with large register files would be most susceptible to this class of bug.
Two independent testers had more elaborate test cases that failed very
occasionally on x86-64 with the MBARI 7 patches on x86-64. They both report
that their tests now work with MBARI 8A.
Here is one of the simpler examples of volatile qualifiers being misplaced
in the unpatched eval.c:
(See if you don't agree)
/* function to call func under the specified class/module context */
static VALUE
exec_under(func, under, cbase, args)
VALUE (*func)();
- VALUE under, cbase;
+ VALUE under;
+ volatile VALUE cbase;
void *args;
{
- VALUE val = Qnil; /* OK */
+ VALUE val;
int state;
- int mode;
+ volatile int mode;
struct FRAME *f = ruby_frame;
PUSH_CLASS(under);
PUSH_FRAME();
ruby_frame->self = f->self;
ruby_frame->last_func = f->last_func;
ruby_frame->orig_func = f->orig_func;
ruby_frame->last_class = f->last_class;
ruby_frame->argc = f->argc;
if (cbase) {
PUSH_CREF(cbase);
}
mode = scope_vmode;
SCOPE_SET(SCOPE_PUBLIC);
PUSH_TAG(PROT_NONE);
if ((state = EXEC_TAG()) == 0) {
val = (*func)(args);
}
POP_TAG();
if (cbase) POP_CREF();
SCOPE_SET(mode);
POP_FRAME();
POP_CLASS();
if (state) JUMP_TAG(state);
return val;
}
Unfortunately, there is a lot of this sort of thing in eval.c.
MBARI8 is a big patch as a result.
I'm guessing that we are not seeing failures in the field because the x86-32
has very few registers, so, in practice, variables are usually on the stack
and thus preserved through longjmps even when they are not explicitly
declared volatile.
I'd actually be quite relieved if I were proven wrong about this :-)
Otherwise, these fixes will be in the patches I submit upstream.
The only bright side is that, by removing the volatile qualifier from
variables where
it was unnecessary, MBARI8 on x86-64 seems to have realized a few percent
speed improvement running
the ruby test suite over both unpatched Ruby and the Ruby with the MBARI7
patch.
- brent
--
View this message in context: http://www.nabble.com/MBARI8-patch-fixes-bugs-caused-by-incorrect-volatile-variable-declarations-tp22259357p22259357.html
Sent from the ruby-core mailing list archive at Nabble.com.