On Sep 19, 2010, at 9:55 AM, Eric MSP Veith wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Sunday 19 September 2010, Jeff Johnson <n3...@mac.com> wrote:
>> $ ./rpm --rpmrubydebug -E '%{ruby:print "-->     ruby: Puppet
>> Gems!\n"}%{ruby:print "-->     ruby: Puppet Gems!\n"}' -->
>> rpmrubyNew((nil),0x0) ruby 0x89f81f0
>> --> rpmrubyRun(0x89f81f0,require 'stringio'
>> $stdout = StringIO.new($result, "w+")
>> ,(nil))
> 
> That's strange, you've gotten the segfault at a completely different 
> position. I.e., I was able to force the whole evaluation with the call to 
> ruby_cleanup commented out. Of course not a solution, but the eval went 
> through at least... Let's say it with Fiddler's Green's words: "Hoom. 
> *lenseclean*"
> 

I'm pretty sure the issue is here:
        #define RUBY_INIT_STACK \
            VALUE variable_in_this_stack_frame; \
            ruby_init_stack(&variable_in_this_stack_frame);
Passing the address of a VALUE on the stack can't possibly be right.

I tried passing heap memory, still a segfault.

>> A little googling found you active in the ruby forums ;-)
> 
> Sure. I mean, wouldn't it be great if the guy that is fiddeling with Ruby 
> was actually using the thing? :-D
> 

I'd say ruby-1.8.7 instead. But if you find me any example
of a ruby-1.9.2 embedding (not the language embedding, and not the
widely published example of ruby_run_node(), but any other
example), then I'm sure I can make it work in RPM.

With ruby-1.8.x, I used VIM as an example. I'm not sure VIM has succeeded
with ruby 1.9.2 embedding either (its easy to get tricked and link
the wrong library).

73 de Jeff
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

Reply via email to