On Thu, Jun 07, 2012 at 05:54:51PM +0200, Josef Reidinger wrote:
Hi, when I port of yast2-ruby-bindings to ruby 1.9 as we use in factory I face segfault when require string from C api.
When I attach gdb I don't see anything special. I pass common c string to rb_require method and it segfault.
Program received signal SIGSEGV, Segmentation fault. 0x00007ffff5527858 in __longjmp_chk () from /lib64/libc.so.6 (gdb) up #1 0x00007ffff3dd9a5c in rb_require_safe () from /usr/lib64/libruby1.9.so.1.9 (gdb) up #2 0x00007ffff4199e9c in YRuby::loadModule (argList=...) at /home/abuild/rpmbuild/BUILD/yast2-ruby-bindings-0.3.10/src/ruby/YRuby.cc:145 145 VALUE result = rb_require(module_path.c_str()); (gdb) p module_path $1 = "/home/abuild/rpmbuild/BUILD/yast2-ruby-bindings-0.3.10/tests/ycp/URI"
[...] Do you have any hints what could be wrong?
I suspect Ruby memory management, but I am prejudiced by an earlier bug: https://bugzilla.novell.com/show_bug.cgi?id=708059 Have you tried valgrind? -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu