[#23657] [Bug #1550] String#lstrip! raises RuntimeError on Frozen String Despite Making No Changes — Run Paint Run Run <redmine@...>
Bug #1550: String#lstrip! raises RuntimeError on Frozen String Despite Making No Changes
Hi,
On Jun 1, 2009, at 5:07 PM, Yukihiro Matsumoto wrote:
Hi,
Issue #1550 has been updated by Yukihiro Matsumoto.
This change seems to break the build on my machine:
[#23683] [Bug #1560] multi core operations are slower on trunk (possible regression) — David Cuadrado <redmine@...>
Bug #1560: multi core operations are slower on trunk (possible regression)
[#23700] Standard Ruby bytecode — Ioannis Nousias <s0238762@...>
I came across this post:
[#23717] [Bug #1573] $0 behaves unexpectedly — Morris Brodersen <redmine@...>
Bug #1573: $0 behaves unexpectedly
[#23727] [Bug #1580] TestIOScanF failure in windows — Roger Pack <redmine@...>
Bug #1580: TestIOScanF failure in windows
[#23729] [Bug #1583] Time + String no Longer Raises TypeError? — Run Paint Run Run <redmine@...>
Bug #1583: Time + String no Longer Raises TypeError?
Issue #1583 has been updated by Akira Tanaka.
Hi,
Excerpts from Yukihiro Matsumoto's message of Sun Jun 07 17:07:06 +0300 2009:
[#23738] Ducktyping interface — Yehuda Katz <wycats@...>
Matz,
[#23753] [Bug #1587] Problem with string sharing — Quet Zal <redmine@...>
Bug #1587: Problem with string sharing
[#23770] [Bug #1595] rake unusable on windows install — Robert Gonzalez <redmine@...>
Bug #1595: rake unusable on windows install
[#23815] inheriting socket in child process on native Windows — "Knutaf" <knutaf@...>
Hello,
> This works on Linux by persisting socket.fileno from the parent process a=
Well, I'm already not exactly using pure Ruby, since I'm wrapping
> Besides that, I think using WSADuplicateSocket will suffer from the
I tried that with both the HANDLE value and with an fd value that I
> I tried that with both the HANDLE value and with an fd value that I
[#23842] request for updated ri/rdoc on 1.8.7 branch — Roger Pack <rogerdpack@...>
would it be possible to get a newer version of ri/rdoc installed on
[#23845] [Bug #1627] Kernel.require Should Canonicalise Paths — Run Paint Run Run <redmine@...>
Bug #1627: Kernel.require Should Canonicalise Paths
[#23849] [Bug #1629] [Segfault] z = Zlib::GzipReader.new segfaults — Markus Fischer <redmine@...>
Bug #1629: [Segfault] z = Zlib::GzipReader.new segfaults
[#23850] instance_eval no longer yielding self in ruby 1.9 — apeiros <apeiros@...>
Hi folks
Hi,
Am 16.06.2009 um 22:12 schrieb Yusuke ENDOH:
Am 17.06.2009 um 00:01 schrieb Florian Gilcher:
[#23869] [Bug #1640] [PATCH] Documentation for the Rational Class — Run Paint Run Run <redmine@...>
Bug #1640: [PATCH] Documentation for the Rational Class
[#23878] trouble registering and logging in to the issue tracking system — Knutaf H <knutaf@...>
Hi,
[#23883] Merging recent Ruby threading improvements — Joe Damato <ice799@...>
Hi ruby-core and CC'ed friends -
[#23934] [Bug #1661] RegExp mismatch — Adam Carheden <redmine@...>
Bug #1661: RegExp mismatch
[#23950] [Bug #1668] Error installing ruby gems for 1.9.1 on windows vista — Kristian Mandrup <redmine@...>
Bug #1668: Error installing ruby gems for 1.9.1 on windows vista
[#23977] [ANN] meeting log of RubyDeveloperKaigi20090622 — "Yugui (Yuki Sonoda)" <yugui@...>
Hi,
Thanks for the update. :-)
On Jun 23, 2009, at 4:23 AM, Run Paint Run Run wrote:
James Gray wrote:
Sorry for late response,
On Tue, Jul 7, 2009 at 12:12 AM, NARUSE, Yui<naruse@airemix.jp> wrote:
On Mon, Jul 6, 2009 at 10:18 PM, Luis Lavena<luislavena@gmail.com> wrote:
Charles Oliver Nutter wrote:
I agree pretty much across the board. I was actually hoping that
Charles Oliver Nutter wrote:
2009/6/23 Yugui (Yuki Sonoda) <yugui@yugui.jp>
2009/6/23 Yugui (Yuki Sonoda) <yugui@yugui.jp>:
On Wed, Jul 1, 2009 at 3:20 PM, Charles Oliver
[#23986] possible bug with windows `` they don't set $? — Roger Pack <rogerdpack@...>
Looks like a bug? [1.8 or 1.9]
[#23988] [Bug #1680] URI.encode does not encode '+' (by default) — Xuân Baldauf <redmine@...>
Bug #1680: URI.encode does not encode '+' (by default)
[#23997] [Bug #1681] Integer#chr Should Infer Encoding of Given Codepoint — Run Paint Run Run <redmine@...>
Bug #1681: Integer#chr Should Infer Encoding of Given Codepoint
Hi,
>> This seems needlessly verbose given that Ruby already knows
[#24007] [Bug #1684] ruby/rubyw.rc still say 1.9.1 — Roger Pack <redmine@...>
Bug #1684: ruby/rubyw.rc still say 1.9.1
[#24010] [Bug #1685] Some windows unicode path issues remain — B Kelly <redmine@...>
Bug #1685: Some windows unicode path issues remain
Issue #1685 has been updated by B Kelly.
Issue #1685 has been updated by Yuki Sonoda.
Yuki Sonoda wrote:
Hi,
Hello,
U.Nakamura wrote:
Hello,
U.Nakamura wrote:
Hello,
Hi,
Hello,
Hi,
Hello,
[#24025] [Bug #1688] Zlib raises a buffer error when inflating some kinds of data — Luis Lavena <redmine@...>
Bug #1688: Zlib raises a buffer error when inflating some kinds of data
Issue #1688 has been updated by Roger Pack.
On Thu, Jun 25, 2009 at 10:28 AM, Roger Pack<redmine@ruby-lang.org> wrote:
[#24032] [Bug #1690] backticks don't set $? in windows — Roger Pack <redmine@...>
Bug #1690: backticks don't set $? in windows
[#24033] [Bug #1691] ruby --help doesn't display the "skip rubygems" option — Roger Pack <redmine@...>
Bug #1691: ruby --help doesn't display the "skip rubygems" option
[#24050] 1.9.2 Should Pass RubySpec Before Release — Run Paint Run Run <runrun@...>
I humbly suggest that a prerequisite of 1.9.2 being released is that
[#24058] [Bug #1696] http downloads are unuseably slow — Steven Hartland <redmine@...>
Bug #1696: http downloads are unuseably slow
Issue #1696 has been updated by Steven Hartland.
Net/HTTP in 1.9.2dev is already working as you described with two
In article <4a464441bf3f7_13bd3907d016634@redmine.ruby-lang.org>,
Excerpts from Tanaka Akira's message of Mon Jun 29 21:17:58 +0300 2009:
On Jun 29, 2009, at 1:38 PM, Eero Saynatkari wrote:
[#24063] [Feature #1697] Object#<=> — Marc-Andre Lafortune <redmine@...>
Feature #1697: Object#<=>
Issue #1697 has been updated by Rick DeNatale.
Excerpts from Luiz Angelo Daros de Luca's message of Sun Jun 28 16:22:45 +0300 2009:
[#24069] [ANN] RubyInstaller: Building installers story and news — Luis Lavena <luislavena@...>
Hey guys,
> We have preview1!!!
[#24099] [Bug #1708] require 'complex' Causes Unexpected Behaviour — Run Paint Run Run <redmine@...>
Bug #1708: require 'complex' Causes Unexpected Behaviour
[ruby-core:24002] [Bug #1682] Low probability error in gc
Bug #1682: Low probability error in gc
http://redmine.ruby-lang.org/issues/show/1682
Author: John Carter
Status: Open, Priority: Normal
ruby -v: ruby 1.8.8dev (2009-06-23) [i686-linux]
I am trying to track a very hard to reproduce one in a million
segfault in ruby that seems to be a corrupted heap.
So I'm am using valgrind on the latest (24th Jun 2009) snapshot from
ftp://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz
Yup, you've seen this one before and declared it innocuous, but
patience, follow my chain of logic and you will realise in certain
corner cases it may be fatal.
Valgrind reports the... and the standard answer is yes, yes, we know
it's Rubies conservative garbage collection it doesn't matter, but
keep reading and I will show you how it may on occasions matter.
==5709== Conditional jump or move depends on uninitialised value(s)
==5709== at 0x8075383: gc_mark (ruby.h:731)
==5709== by 0x8074F98: mark_locations_array (gc.c:708)
==5709== by 0x8075701: garbage_collect (gc.c:1497)
==5709== by 0x8075FFC: rb_newobj (gc.c:453)
==5709== Uninitialised value was created by a stack allocation
==5709== at 0x8095D84: rb_node_newnode (parse.y:4591)
If we have a look at that location in parse.y we have this code.
----------------------------------------------------------------------
NODE*
rb_node_newnode(type, a0, a1, a2)
enum node_type type;
VALUE a0, a1, a2;
{
NODE *n = (NODE*)rb_newobj();
----------------------------------------------------------------------
ie. The uninitialized value is the "n". Nothing special about this
line, we get to this state from many other locations.
So what is happening here...
..when a new object is allocated an nothing is available in on the free list,
The gc runs around marking everything that is still "live" and then
sweeps up the leavings.
But what is still "live"? Anything currently on the stack for example.
But what about things like "n" which are on the stack, but not initialized yet?
No problem, if it is a number that, if viewed as a pointer, points
into a chunk of heap. We regard it as "live" anyway. If we're wrong
and it's just a number... or even a random string of uninitialized
bits left on the stack (like "n" above), no problem.. we just don't
garbage collect it and waste a bit of ram.
FLUSH_REGISTER_WINDOWS;
/* This assumes that all registers are saved into the jmp_buf (and stack) */
rb_setjmp(save_regs_gc_mark);
mark_locations_array((VALUE*)save_regs_gc_mark, sizeof(save_regs_gc_mark) / sizeof(VALUE *));
#if STACK_GROW_DIRECTION < 0
rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
Inicidentally rb_gc_mark_locations is implemented in terms of
mark_locations_array so lets have a closer look at
mark_locations_array
static inline int
is_pointer_to_heap(ptr)
void *ptr;
{
register RVALUE *p = RANY(ptr);
register RVALUE *heap_org;
register long i;
if (p < lomem || p > himem) return Qfalse;
if ((VALUE)p % sizeof(RVALUE) != 0) return Qfalse;
/* check if p looks like a pointer */
for (i=0; i < heaps_used; i++) {
heap_org = heaps[i].slot;
if (heap_org <= p && p < heap_org + heaps[i].limit)
return Qtrue;
}
return Qfalse;
}
static void
mark_locations_array(x, n)
register VALUE *x;
register long n;
{
VALUE v;
while (n--) {
v = *x;
if (is_pointer_to_heap((void *)v)) {
gc_mark(v, 0);
}
x++;
}
}
So mark_locations_array just scans along an arbitary chunk of
ram.. eg. the stack. Treating every four bytes as a pointer (whether
it is or not).
The is_pointer_to_heap predicate checks to see if that number points
to a location in the heap...
if (p < lomem || p > himem) return Qfalse;
and that is typically the line that valgrind whinges about.
Occasionally an uninitialized value just happens to pass that first
crude check and then valgrind whinges on this line.
if (heap_org <= p && p < heap_org + heaps[i].limit)
return Qtrue;
But then we can be fairly confident that p _is_ pointing somewhere
within a valid ruby object that we should mark as live. Perhaps it
shouldn't be, perhaps it was just an accident that some number just
happen to be in that range, so we on rare occassions waste some ram,
so what.
So far, perfect.
Alas, instead of returning the start of that ruby object, we just
return true.
Actually the thing living between heaps[i].slot and
heaps[i].slot+heaps[i].limit is typically an array of roughly
10000 RValue's.
And then instead of marking the start of that heap block as live, _or_
the start of the RValue within which v is pointing to , we mark what
thing v is pointing to as live.
v = *x;
if (is_pointer_to_heap((void *)v)) {
gc_mark(v, 0);
That would be OK... except gc_mark (sometimes) modifies what v is
pointing to by flipping the FL_MARK bit. And then hunting down the
children of that object and marking them.
static void
gc_mark(ptr, lev)
VALUE ptr;
int lev;
{
register RVALUE *obj;
obj = RANY(ptr);
if (rb_special_const_p(ptr)) return; /* special const not marked */
if (obj->as.basic.flags == 0) return; /* free cell */
if (obj->as.basic.flags & FL_MARK) return; /* already marked */
obj->as.basic.flags |= FL_MARK;
All Good. EXCEPT if v is pointing into the middle of a 20 byte RValue
union instead of the start!
Ok, so 99.999% of random bitstrings like "n" picked up this way got
there because they were at some stage valid pointers to RValues BUT it
is NOT gauranteed.
ie. We have a very low probability bug that gc will treat the inner
part of a RValue as an RValue with possible bad results. (segfault,
corruption...)
Solution? Change the line...
gc_mark(v, 0);
to convert v to the nearest sizeof(RValue) aligned address at or below.
gc_mark(v - (v % sizeof(RVALUE)), 0);
Well, at least in this case of invoking gc_mark. I haven't reviewed
all the other invocations.
----------------------------------------
http://redmine.ruby-lang.org