[#22637] [Bug #1240] parser bug in 1.8.7 and 1.9.1p0 — Thomer Gil <redmine@...>
Bug #1240: parser bug in 1.8.7 and 1.9.1p0
Issue #1240 has been updated by Yusuke Endoh.
[#22640] [Bug #1241] Segfault with Nokogiri 1.2.1 on Ruby 1.9.1p0 — Raven Ex <redmine@...>
Bug #1241: Segfault with Nokogiri 1.2.1 on Ruby 1.9.1p0
[#22646] [Bug #1243] 1 is prime — Yuki Sonoda <redmine@...>
Bug #1243: 1 is prime
Issue #1243 has been updated by Dave B.
[#22684] [Bug #1247] YAML::load converts some dates into strings — Matthew Wilson <redmine@...>
Bug #1247: YAML::load converts some dates into strings
Issue #1247 has been updated by Yusuke Endoh.
On Thu, Apr 08, 2010 at 10:22:57PM +0900, Yusuke Endoh wrote:
On 4/8/10, Aaron Patterson <aaron@tenderlovemaking.com> wrote:
Hi,
[#22685] 1.9 conditional wait has no timeout support — Nasir Khan <rubylearner@...>
In ruby 1.8 we could use -
[#22687] [Bug #1248] e.exception(e) returns self — Tomas Matousek <redmine@...>
Bug #1248: e.exception(e) returns self
Hi,
Well the reason is that arg is supposed to be a message, right? A message c=
[#22715] [Bug #1251] gsub problem — Alexander Pettelkau <redmine@...>
Bug #1251: gsub problem
[#22725] [Bug #1253] Fix MSVC Build Issues — Charlie Savage <redmine@...>
Bug #1253: Fix MSVC Build Issues
[#22727] Moving ruby 1.9.1 forward on windows — Charlie Savage <cfis@...>
Hi everyone,
On Sat, Mar 7, 2009 at 7:01 PM, Charlie Savage <cfis@savagexi.com> wrote:
> This works until you start linking third-party upstream source that
On Sun, Mar 8, 2009 at 3:45 PM, Charlie Savage <cfis@savagexi.com> wrote:
Hi Austin,
On Sun, Mar 8, 2009 at 4:26 PM, Charlie Savage <cfis@savagexi.com> wrote:
[#22731] [Bug #1255] += for large strings egrigiously slow — James Lee <redmine@...>
Bug #1255: += for large strings egrigiously slow
[#22736] Ruby 1.9.1 and tail recursion optimization — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>
Moin, moin!
Wolfgang N疆asi-Donner schrieb:
Hi,
>
On Sun, Mar 8, 2009 at 16:57, James Coglan <jcoglan@googlemail.com> wrote:
2009/3/8 Nikolai Weibull <now@bitwi.se>
James Coglan wrote:
daz schrieb:
Wolfgang N=C3=A1dasi-Donner wrote:
Charles Oliver Nutter schrieb:
[#22748] [Feature #1256] Add constant TAILRECURSION to let a program recognize if tail recursion optimization is implemented — Wolfgang Nádasi-Donner <redmine@...>
Feature #1256: Add constant TAILRECURSION to let a program recognize if tail recursion optimization is implemented
Hi,
[#22803] Relegate 1.8.6 to Engine Yard, part II — Urabe Shyouhei <shyouhei@...>
Hello and sorry for my being slow for this issue. It's OK now for me to pass
Ryan Davis wrote:
Urabe Shyouhei wrote:
Hi,
Nobuyoshi Nakada wrote:
Urabe Shyouhei wrote:
[#22812] [Bug #1261] cross-compiling Ruby extensions using mkmf doesn't fully respect DESTDIR — Daniel Golle <redmine@...>
Bug #1261: cross-compiling Ruby extensions using mkmf doesn't fully respect DESTDIR
[#22859] [Bug #1277] Incorrect passing of file handle between runtime libraries in OpenSSL extension — Charlie Savage <redmine@...>
Bug #1277: Incorrect passing of file handle between runtime libraries in OpenSSL extension
[#22892] Ruby Time — valodzka <valodzka@...>
Got tired of current ruby Time limitation, I have written this -
In article <9e19ed87-9d12-4f98-af3c-bd49a71b0bd4@p11g2000yqe.googlegroups.com>,
valodzka wrote:
> I bet you'll get tired of updating that database. There's a major difference
In article <b5d0a489-4613-4b63-9664-8627358b2dd9@g19g2000yql.googlegroups.com>,
> I found a discussion in PHP.
In article <deab6882-12ac-4aa1-a901-681795ed863b@z9g2000yqi.googlegroups.com>,
[#22893] [Feature #1291] O_CLOEXEC flag missing for Kernel::open — David Martin <redmine@...>
Feature #1291: O_CLOEXEC flag missing for Kernel::open
Issue #1291 has been updated by Motohiro KOSAKI.
[#22894] [Bug #1292] 1.8 compile time error with mingw gcc 4.3 — Roger Pack <redmine@...>
Bug #1292: 1.8 compile time error with mingw gcc 4.3
Hi,
[#22916] [Bug #1296] [trunk/22981] 64-bit issues on trunk in ext/zlib — Ollivier Robert <redmine@...>
Bug #1296: [trunk/22981] 64-bit issues on trunk in ext/zlib
[#22927] [Bug #1301] Poor RegExp Matching Performance — Andreas Grau <redmine@...>
Bug #1301: Poor RegExp Matching Performance
[#22935] 1.8.6 rdoc breaks when rdoc'ing 1.9 — James Britt <james.britt@...>
I'm running ruby 1.8.6 (2009-03-10 patchlevel 362) [i686-linux] and
[#22937] Ruby not to be a part of Google's 2009 Summer of Code? — Rocky Bernstein <rocky.bernstein@...>
The list of participating organizations for Google's 2009 Summer of Code has
[#22978] Ruby 1.9 bloc parameters — Vincent Isambart <vincent.isambart@...>
Hi,
[#22979] Ruby 1.9 bloc parameters — Vincent Isambart <vincent.isambart@...>
Hi,
[#22990] [Bug #1309] dl tests — Charlie Savage <redmine@...>
Bug #1309: dl tests
[#23026] [Bug #1317] Creating a range with strings — Ian Bailey <redmine@...>
Bug #1317: Creating a range with strings
Issue #1317 has been updated by Michael Selig.
[#23050] [Bug #1322] define_method scope bug — "coderrr ." <redmine@...>
Bug #1322: define_method scope bug
[#23051] [Bug #1323] Sockets broken on windows — Charlie Savage <redmine@...>
Bug #1323: Sockets broken on windows
[#23053] [Bug #1325] fiber tests kill windows — Charlie Savage <redmine@...>
Bug #1325: fiber tests kill windows
[#23054] [Bug #1326] Failing unit tests on windows — Charlie Savage <redmine@...>
Bug #1326: Failing unit tests on windows
[#23060] [Bug #1327] CSV unit test failures on windows — Charlie Savage <redmine@...>
Bug #1327: CSV unit test failures on windows
[#23063] [Bug #1332] Reading file on Windows is 500x slower then with previous Ruby version — Damjan Rems <redmine@...>
Bug #1332: Reading file on Windows is 500x slower then with previous Ruby version
Issue #1332 has been updated by Roger Pack.
Hello,
[#23075] [Bug #1336] Change in string representation of Floats — Brian Ford <redmine@...>
Bug #1336: Change in string representation of Floats
Issue #1336 has been updated by Roger Pack.
Hi,
Hi,
Hi,
Gary Wright wrote:
Issue #1336 has been updated by Roger Pack.
On Fri, Apr 3, 2009 at 11:49 PM, Roger Pack <redmine@ruby-lang.org> wrote:
[#23082] [Bug #1341] pthread_cond_timedwait failing in 1.9.1-p0 thread tests — Graham Agnew <redmine@...>
Bug #1341: pthread_cond_timedwait failing in 1.9.1-p0 thread tests
[ruby-core:22683] Re: MBARI8 patch fixes bugs caused by incorrect volatile variable declarations
A coworker of mine is working on his masters thesis using Ruby and some C
libraries. He was originally having some issues with the memory leak and
tried the MBARI 7 patches. He did see a nice improvement, but since he had
compiled for 64bit he was seeing segfaults happening during long running
processes. After I mentioned the MBARI 8 patches he recompiled his Ruby and
reported to me that his script was no longer segfaulting.
- Michael
On Sat, Feb 28, 2009 at 12:47 AM, Brent Roman <brent@mbari.org> wrote:
>
> 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.
>
>
>