[#10853] Why limit class def to a constant or colon node? — Charles Oliver Nutter <charles.nutter@...>

Is there a historical reason why I can't do something like these:

12 messages 2007/04/03

[#10933] Cannot build with extra library path if previous version already installed — <noreply@...>

Bugs item #10140, was opened at 2007-04-16 17:32

10 messages 2007/04/16
[#10934] Re: [ ruby-Bugs-10140 ] Cannot build with extra library path if previous version already installed — nobu@... 2007/04/16

Hi,

[#10960] Re: [ ruby-Bugs-10140 ] Cannot build with extra library path if previous version already installed — "Michal Suchanek" <hramrach@...> 2007/04/18

On 4/16/07, nobu@ruby-lang.org <nobu@ruby-lang.org> wrote:

[#10967] Re: [ ruby-Bugs-10140 ] Cannot build with extra library path if previous version already installed — Nobuyoshi Nakada <nobu@...> 2007/04/19

Hi,

[#10970] Re: [ ruby-Bugs-10140 ] Cannot build with extra library path if previous version already installed — "Michal Suchanek" <hramrach@...> 2007/04/19

On 4/19/07, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:> Hi,>> At Wed, 18 Apr 2007 20:21:44 +0900,> Michal Suchanek wrote in [ruby-core:10960]:> > Yes. And this should also apply to extensions. The mkmf tests are now> > fine but the extension is linked with -L/sw/lib before -L../..>> Indeed.>>> Index: configure.in> ===================================================================> --- configure.in (revision 12191)> +++ configure.in (working copy)> @@ -1385,5 +1385,4 @@ if test "$enable_rpath" = yes; then> fi>> -LDFLAGS="-L. $LDFLAGS"> AC_SUBST(ARCHFILE)>This would break the previous fix so I did not even try to apply this ^

[#11003] miniruby loads extensions from already installed ruby — <noreply@...>

Bugs item #10303, was opened at 2007-04-23 10:44

10 messages 2007/04/23

[#11025] gsub with backslash characters in replacement string — "Adam Bozanich" <adam.boz@...>

Hello, spotted this one the other day:

10 messages 2007/04/26

Stack problems with embedded ruby

From: gga <ggarra@...>
Date: 2007-04-27 22:59:58 UTC
List: ruby-core #11054
Okay, I did a little bit more digging into ruby's source code (both 1.8
and 1.9), and it seems the problem lies in Init_stack() (and its cousin
ruby_init_stack in later ruby versions) within gc.c.

Currently, Init_stack() does not guarantee that the stack is reset.
Ruby seems to do a bounds check first and only then decides whether to
reset its internal variable (rb_gc_stack_start).

This can easily lead ruby to think the stack is about to overflow and
raise a stack error on an embedded ruby where ruby functions are called
from drastically different addresses in memory.

Unfortunately, for an embedded application, this is problematic.  You
really want ruby_init_stack() to init the stack to the address passed
and not do the bounds check.  Or is that the bounds check is being
incorrectly done (reversed) on x86-64 AMD machines?

When I remove the bounds check, all works as expected.

Can anyone explain the logic of the current behavior?

---

Here's a sample run of what happens with an embedded ruby where some
methods are being called as callbacks from C++:

>>> Embedded ruby is inited (and some basic config stuff is run)
ruby_init_stack: (nil) at START
ruby_init_stack: should reset to 0x7fffb12eb980
ruby_init_stack: 0x7fffb12eb980 at END
Init_stack: 0x7fffb12eb980 at START
Init_stack should reset to: 0x7fffb12eb964
Init_stack: 0x7fffb12eb980 at END
mark stack 0x7fffb12eb980 - 0x7fffb12e7820- MARKED

Starting Rendering /home/gga/maya/projects/default/images/untitled.iff.
Rendering current frame.

>>>
>>> Render begins
>>> shader's callback is called, ruby_init_stack(&localvar) is used
>>> to reset stack, but it fails to do so.
>>>
ruby_init_stack: 0x7fffb12eb980 at START
ruby_init_stack: should reset to 0x418021d0
ruby_init_stack: 0x7fffb12eb980 at END   -- **NOT RESET**

ruby_init_stack: 0x7fffb12eb980 at START
ruby_init_stack: should reset to 0x418021d0
ruby_init_stack: 0x7fffb12eb980 at END   -- **NOT RESET**

Error: [Ruby] - /usr/local/lib/ruby/1.8/complex.rb:107:in `generic?'
....etc....


-- 
Gonzalo Garramu
ggarra@advancedsl.com.ar

AMD4400 - ASUS48N-E
GeForce7300GT
Kubuntu Edgy

In This Thread

Prev Next