[Bug 551881] New: YaST ruby bindings crashes when importing a Ruby module
http://bugzilla.novell.com/show_bug.cgi?id=551881 Summary: YaST ruby bindings crashes when importing a Ruby module Classification: openSUSE Product: openSUSE 11.2 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Critical Priority: P5 - None Component: WebYaST AssignedTo: dmacvicar@novell.com ReportedBy: lslezak@novell.com QAContact: qa@suse.de CC: jsuchome@novell.com Found By: ---
cat /usr/share/YaST2/modules/YaPI/YML.rb require 'yaml'
module YML def self.parse(file_name) ret = {} if File.exists?(file_name) ret = YAML::load(File.open(file_name)); ret = {} unless ret.is_a? Hash end return ret end end
cat /tmp/ycpruby.ycp { import "YaPI::YML"; any parsed = YaPI::YML::parse("/tmp/custom_services.yml"); y2internal ("parsed: %1", parsed); }
yast2 /tmp/ycpruby.ycp (eval):0:in `const_get': wrong constant name YaPI::YML (NameError) YaST got signal 11 at YCP file /tmp/ycpruby.ycp:2 /sbin/yast2: line 454: 16804 Segmentation fault $ybindir/y2base $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2UI_ARGS
GDB backtrace:
#0 0x00007ffff4074e0f in rb_longjmp (tag=<value optimized out>, mesg=<value
optimized out>) at eval.c:4634
#1 0x00007ffff40751d1 in rb_exc_raise (mesg=6) at eval.c:4650
#2 0x00007ffff40613e4 in rb_name_error (id=<value optimized out>, fmt=<value
optimized out>) at error.c:614
#3 0x00007ffff409e94d in rb_mod_const_get (mod=140737353709920, name=<value
optimized out>) at object.c:1848
#4 0x00007ffff40717c1 in rb_call0 (klass=<value optimized out>, recv=<value
optimized out>, id=<value optimized out>,
oid=<value optimized out>, argc=<value optimized out>, argv=0x7ffff7fcd710,
body=0x7ffff7f95818, flags=0) at eval.c:5904
#5 0x00007ffff40719b3 in rb_call (klass=140737353710120, recv=140737353709920,
mid=3537, argc=1, argv=0x7ffffffef2e0, scope=1,
self=6) at eval.c:6151
#6 0x00007ffff4072698 in vafuncall (recv=<value optimized out>, mid=<value
optimized out>, n=1, ar=<value optimized out>)
at eval.c:6228
#7 0x00007ffff4072925 in rb_funcall (recv=0, mid=6, n=-134677288) at
eval.c:6245
#8 0x00007ffff4341505 in YRubyNamespace::YRubyNamespace (this=<value optimized
out>, name=Traceback (most recent call last):
File "/usr/lib64/../share/gdb/python/libstdcxx/v6/printers.py", line 469, in
to_string
return self.val['_M_dataplus']['_M_p'].string (encoding, length = len)
OverflowError: signed integer is greater than maximum
) at /local/lslezak/SVN/yast/trunk/ruby-bindings/src/ruby/YRubyNamespace.cc:189
#9 0x00007ffff433e00a in Y2RubyComponent::import (this=<value optimized out>,
name=0x644478 "YaPI::YML")
at
/local/lslezak/SVN/yast/trunk/ruby-bindings/src/ruby/Y2RubyComponent.cc:72
#10 0x00007ffff6dcbfa1 in Import::import(std::basic_string
http://bugzilla.novell.com/show_bug.cgi?id=551881
User lslezak@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=551881#c1
--- Comment #1 from Ladislav Slezak
http://bugzilla.novell.com/show_bug.cgi?id=551881
User mvidner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=551881#c2
Martin Vidner
http://bugzilla.novell.com/show_bug.cgi?id=551881
User mvidner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=551881#c3
--- Comment #3 from Martin Vidner
http://bugzilla.novell.com/show_bug.cgi?id=551881
User jsuchome@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=551881#c4
--- Comment #4 from Jiří Suchomel
http://bugzilla.novell.com/show_bug.cgi?id=551881
User dmacvicar@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=551881#c6
--- Comment #6 from Duncan Mac-Vicar
http://bugzilla.novell.com/show_bug.cgi?id=551881
User dmacvicar@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=551881#c7
Duncan Mac-Vicar
participants (1)
-
bugzilla_noreply@novell.com