Hello community,

here is the log from the commit of package yast2-ruby-bindings for 
openSUSE:Factory checked in at 2016-11-01 09:49:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ruby-bindings (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-ruby-bindings"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ruby-bindings/yast2-ruby-bindings.changes  
2016-10-18 13:26:06.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new/yast2-ruby-bindings.changes 
    2016-11-01 09:49:38.000000000 +0100
@@ -1,0 +2,6 @@
+Wed Oct 26 09:46:54 UTC 2016 - [email protected]
+
+- fix crash when references passed between clients (bsc#935385)
+- 3.2.1
+
+-------------------------------------------------------------------

Old:
----
  yast2-ruby-bindings-3.2.0.tar.bz2

New:
----
  yast2-ruby-bindings-3.2.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-ruby-bindings.spec ++++++
--- /var/tmp/diff_new_pack.MRwWKC/_old  2016-11-01 09:49:39.000000000 +0100
+++ /var/tmp/diff_new_pack.MRwWKC/_new  2016-11-01 09:49:39.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ruby-bindings
-Version:        3.2.0
+Version:        3.2.1
 Release:        0
 Url:            https://github.com/yast/yast-ruby-bindings
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-ruby-bindings-3.2.0.tar.bz2 -> yast2-ruby-bindings-3.2.1.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.2.0/package/yast2-ruby-bindings.changes 
new/yast2-ruby-bindings-3.2.1/package/yast2-ruby-bindings.changes
--- old/yast2-ruby-bindings-3.2.0/package/yast2-ruby-bindings.changes   
2016-10-13 11:19:46.000000000 +0200
+++ new/yast2-ruby-bindings-3.2.1/package/yast2-ruby-bindings.changes   
2016-10-26 12:58:09.000000000 +0200
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Wed Oct 26 09:46:54 UTC 2016 - [email protected]
+
+- fix crash when references passed between clients (bsc#935385)
+- 3.2.1
+
+-------------------------------------------------------------------
 Thu Oct 13 08:55:07 UTC 2016 - [email protected]
 
 - properly document usage of CallFunction and have useful error
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.2.0/package/yast2-ruby-bindings.spec 
new/yast2-ruby-bindings-3.2.1/package/yast2-ruby-bindings.spec
--- old/yast2-ruby-bindings-3.2.0/package/yast2-ruby-bindings.spec      
2016-10-13 11:19:46.000000000 +0200
+++ new/yast2-ruby-bindings-3.2.1/package/yast2-ruby-bindings.spec      
2016-10-26 12:58:09.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ruby-bindings
-Version:        3.2.0
+Version:        3.2.1
 Url:            https://github.com/yast/yast-ruby-bindings
 Release:        0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.2.0/src/binary/Y2YCPTypeConv.cc 
new/yast2-ruby-bindings-3.2.1/src/binary/Y2YCPTypeConv.cc
--- old/yast2-ruby-bindings-3.2.0/src/binary/Y2YCPTypeConv.cc   2016-10-13 
11:19:46.000000000 +0200
+++ new/yast2-ruby-bindings-3.2.1/src/binary/Y2YCPTypeConv.cc   2016-10-26 
12:58:09.000000000 +0200
@@ -82,6 +82,13 @@
   return rb_class_new_instance(RARRAY_LEN(params), RARRAY_PTR(params),cls);
 }
 
+extern "C" void
+rb_ref_free(void *p)
+{
+  SymbolEntry *ref = (SymbolEntry*) p;
+  delete ref;
+}
+
 extern "C" VALUE
 ycp_ref_to_rb_ref( YCPReference ycpref )
 {
@@ -93,7 +100,11 @@
 
   VALUE yast = rb_define_module("Yast");
   VALUE cls = rb_const_get(yast, rb_intern("YReference"));
-  return Data_Wrap_Struct(cls, 0, NULL, (void*)&*ycpref->entry());
+  SymbolEntryPtr se = ycpref->entry();
+  // create copy of SE to prevent deallocation as we do not store it in smart 
pointer in ruby,
+  // so create new copy see bsc#935385
+  SymbolEntry *sec = new SymbolEntry(se->nameSpace(), se->position(), 
se->name(), se->category(), se->type());
+  return Data_Wrap_Struct(cls, 0, rb_ref_free, (void*)sec);
 }
 
 extern "C" void


Reply via email to