[ruby-oci8-commit] [263] branches/ruby-oci8-1.0: * ext/oci8/handle.c: fix a segv bug in gc mark.

nobody at rubyforge.org nobody at rubyforge.org
Tue Jun 24 05:36:19 EDT 2008


Revision: 263
Author:   kubo
Date:     2008-06-24 05:36:18 -0400 (Tue, 24 Jun 2008)

Log Message:
-----------
* ext/oci8/handle.c: fix a segv bug in gc mark. (Thanks to authorNari)
* ext/oci8/oraconf.rb: fix for windows Oracle 11g instant client.
* test/config.rb, test/test_bind_raw.rb, test/test_bind_time.rb,
  test/test_break.rb, test/test_clob.rb, test/test_connstr.rb,
  test/test_dbi.rb, test/test_dbi_clob.rb, test/test_describe.rb,
  test/test_metadata.rb, test/test_oci8.rb, test/test_oradate.rb,
  test/test_oranumber.rb:
    fix to run tests in directories outside of 'test' directory.

Modified Paths:
--------------
    branches/ruby-oci8-1.0/ChangeLog
    branches/ruby-oci8-1.0/ext/oci8/handle.c
    branches/ruby-oci8-1.0/ext/oci8/oraconf.rb
    branches/ruby-oci8-1.0/test/config.rb
    branches/ruby-oci8-1.0/test/test_bind_raw.rb
    branches/ruby-oci8-1.0/test/test_bind_time.rb
    branches/ruby-oci8-1.0/test/test_break.rb
    branches/ruby-oci8-1.0/test/test_clob.rb
    branches/ruby-oci8-1.0/test/test_connstr.rb
    branches/ruby-oci8-1.0/test/test_dbi.rb
    branches/ruby-oci8-1.0/test/test_dbi_clob.rb
    branches/ruby-oci8-1.0/test/test_describe.rb
    branches/ruby-oci8-1.0/test/test_metadata.rb
    branches/ruby-oci8-1.0/test/test_oci8.rb
    branches/ruby-oci8-1.0/test/test_oradate.rb
    branches/ruby-oci8-1.0/test/test_oranumber.rb

Modified: branches/ruby-oci8-1.0/ChangeLog
===================================================================
--- branches/ruby-oci8-1.0/ChangeLog	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/ChangeLog	2008-06-24 09:36:18 UTC (rev 263)
@@ -1,3 +1,13 @@
+2008-06-24  KUBO Takehiro  <kubo at jiubao.org>
+	* ext/oci8/handle.c: fix a segv bug in gc mark. (Thanks to authorNari)
+	* ext/oci8/oraconf.rb: fix for windows Oracle 11g instant client.
+	* test/config.rb, test/test_bind_raw.rb, test/test_bind_time.rb,
+	  test/test_break.rb, test/test_clob.rb, test/test_connstr.rb,
+	  test/test_dbi.rb, test/test_dbi_clob.rb, test/test_describe.rb,
+	  test/test_metadata.rb, test/test_oci8.rb, test/test_oradate.rb,
+	  test/test_oranumber.rb:
+	    fix to run tests in directories outside of 'test' directory.
+
 2008-04-27  KUBO Takehiro  <kubo at jiubao.org>
 	* NEWS: add changes between 1.0.0 and 1.0.1.
 	* VERSION: update to 1.0.1.

Modified: branches/ruby-oci8-1.0/ext/oci8/handle.c
===================================================================
--- branches/ruby-oci8-1.0/ext/oci8/handle.c	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/ext/oci8/handle.c	2008-06-24 09:36:18 UTC (rev 263)
@@ -185,6 +185,7 @@
     break;
   case OCI_HTYPE_BIND:
     bh = xmalloc(sizeof(oci8_bind_handle_t) - sizeof(bh->value) + value_sz);
+    memset(bh, 0, sizeof(oci8_bind_handle_t) - sizeof(bh->value) + value_sz);
     obj = Data_Wrap_Struct(cOCIBind, oci8_handle_mark, oci8_handle_cleanup, bh);
     bh->bind_type = 0;
     bh->ind = -1;
@@ -194,6 +195,7 @@
     break;
   case OCI_HTYPE_DEFINE:
     bh = xmalloc(sizeof(oci8_bind_handle_t) - sizeof(bh->value) + value_sz);
+    memset(bh, 0, sizeof(oci8_bind_handle_t) - sizeof(bh->value) + value_sz);
     obj = Data_Wrap_Struct(cOCIDefine, oci8_handle_mark, oci8_handle_cleanup, bh);
     bh->bind_type = 0;
     bh->ind = -1;

Modified: branches/ruby-oci8-1.0/ext/oci8/oraconf.rb
===================================================================
--- branches/ruby-oci8-1.0/ext/oci8/oraconf.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/ext/oci8/oraconf.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -284,7 +284,7 @@
     when /mswin32|cygwin|mingw32|bccwin32/
       oci_basename = 'oci'
       oci_glob_postfix = ''
-      ocidata_basename = ['oraociei10', 'oraociicus10']
+      ocidata_basename = ['oraociei11', 'oraociicus11', 'oraociei10', 'oraociicus10']
       @@ld_envs = %w[PATH]
       so_ext = 'dll'
     when /i.86-linux/
@@ -836,18 +836,20 @@
     if ic_dir =~ /^\/usr\/lib(?:64)?\/oracle\/(\d+\.\d+\.\d+\.\d+)\/client(64)?\/lib(?:64)?/
       # rpm package
       #   official x86 rpms:
-      #    library: /usr/lib/oracle/X.X.X.X.X/client/lib/
-      #    include: /usr/include/oracle/X.X.X.X.X/client/
+      #    library: /usr/lib/oracle/X.X.X.X/client/lib/
+      #    include: /usr/include/oracle/X.X.X.X/client/
       #
       #   official x86_64 rpms:
-      #    library: /usr/lib/oracle/X.X.X.X.X/client64/lib/
-      #    include: /usr/include/oracle/X.X.X.X.X/client64/
+      #    library: /usr/lib/oracle/X.X.X.X/client64/lib/
+      #    include: /usr/include/oracle/X.X.X.X/client64/
       #
-      #   third-party x86_64 rpms:
-      #    library: /usr/lib64/oracle/X.X.X.X.X/client/lib/
-      #          or /usr/lib64/oracle/X.X.X.X.X/client/lib64/
-      #    include: /usr/include/oracle/X.X.X.X.X/client/
+      #   third-party x86_64 rpms(*1):
+      #    library: /usr/lib64/oracle/X.X.X.X/client/lib/
+      #          or /usr/lib64/oracle/X.X.X.X/client/lib64/
+      #    include: /usr/include/oracle/X.X.X.X/client/
       #
+      #   *1 These had been used before Oracle released official x86_64 rpms.
+      #
       lib_dir = ic_dir
       inc_dir = "/usr/include/oracle/#{$1}/client#{$2}"
     else

Modified: branches/ruby-oci8-1.0/test/config.rb
===================================================================
--- branches/ruby-oci8-1.0/test/config.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/test/config.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -12,9 +12,9 @@
 nls_lang = nls_lang.upcase unless nls_lang.nil?
 case nls_lang
 when 'JA16EUC'
-  $lobfile = '../doc/api.ja.rd' # EUC-JP file
+  $lobfile = File.dirname(__FILE__) + '/../doc/api.ja.rd' # EUC-JP file
 else
-  $lobfile = '../doc/api.en.rd' # ASCII file
+  $lobfile = File.dirname(__FILE__) + '/../doc/api.en.rd' # ASCII file
 end
 $lobreadnum = 256 # counts in charactors
 

Modified: branches/ruby-oci8-1.0/test/test_bind_raw.rb
===================================================================
--- branches/ruby-oci8-1.0/test/test_bind_raw.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/test/test_bind_raw.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -2,7 +2,7 @@
 require 'oci8'
 require 'runit/testcase'
 require 'runit/cui/testrunner'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestBindRaw < RUNIT::TestCase
   CHECK_TARGET = [

Modified: branches/ruby-oci8-1.0/test/test_bind_time.rb
===================================================================
--- branches/ruby-oci8-1.0/test/test_bind_time.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/test/test_bind_time.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -2,7 +2,7 @@
 require 'oci8'
 require 'runit/testcase'
 require 'runit/cui/testrunner'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestBindTime < RUNIT::TestCase
 

Modified: branches/ruby-oci8-1.0/test/test_break.rb
===================================================================
--- branches/ruby-oci8-1.0/test/test_break.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/test/test_break.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -2,7 +2,7 @@
 require 'oci8'
 require 'runit/testcase'
 require 'runit/cui/testrunner'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestBreak < RUNIT::TestCase
 

Modified: branches/ruby-oci8-1.0/test/test_clob.rb
===================================================================
--- branches/ruby-oci8-1.0/test/test_clob.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/test/test_clob.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -2,7 +2,7 @@
 require 'oci8'
 require 'runit/testcase'
 require 'runit/cui/testrunner'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestCLob < RUNIT::TestCase
 

Modified: branches/ruby-oci8-1.0/test/test_connstr.rb
===================================================================
--- branches/ruby-oci8-1.0/test/test_connstr.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/test/test_connstr.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -1,7 +1,7 @@
 require 'oci8'
 require 'runit/testcase'
 require 'runit/cui/testrunner'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestConnStr < RUNIT::TestCase
   TEST_CASES =

Modified: branches/ruby-oci8-1.0/test/test_dbi.rb
===================================================================
--- branches/ruby-oci8-1.0/test/test_dbi.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/test/test_dbi.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -2,7 +2,7 @@
 require 'oci8'
 require 'runit/testcase'
 require 'runit/cui/testrunner'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestDBI < RUNIT::TestCase
 

Modified: branches/ruby-oci8-1.0/test/test_dbi_clob.rb
===================================================================
--- branches/ruby-oci8-1.0/test/test_dbi_clob.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/test/test_dbi_clob.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -2,7 +2,7 @@
 require 'oci8'
 require 'runit/testcase'
 require 'runit/cui/testrunner'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestDbiCLob < RUNIT::TestCase
 

Modified: branches/ruby-oci8-1.0/test/test_describe.rb
===================================================================
--- branches/ruby-oci8-1.0/test/test_describe.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/test/test_describe.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -2,7 +2,7 @@
 require 'oci8'
 require 'runit/testcase'
 require 'runit/cui/testrunner'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestDescribe < RUNIT::TestCase
 

Modified: branches/ruby-oci8-1.0/test/test_metadata.rb
===================================================================
--- branches/ruby-oci8-1.0/test/test_metadata.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/test/test_metadata.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -1,7 +1,7 @@
 require 'oci8'
 require 'runit/testcase'
 require 'runit/cui/testrunner'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestMetadata < RUNIT::TestCase
 

Modified: branches/ruby-oci8-1.0/test/test_oci8.rb
===================================================================
--- branches/ruby-oci8-1.0/test/test_oci8.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/test/test_oci8.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -1,7 +1,7 @@
 require 'oci8'
 require 'runit/testcase'
 require 'runit/cui/testrunner'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestOCI8 < RUNIT::TestCase
 

Modified: branches/ruby-oci8-1.0/test/test_oradate.rb
===================================================================
--- branches/ruby-oci8-1.0/test/test_oradate.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/test/test_oradate.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -2,7 +2,7 @@
 require 'oci8'
 require 'runit/testcase'
 require 'runit/cui/testrunner'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestOraDate < RUNIT::TestCase
 

Modified: branches/ruby-oci8-1.0/test/test_oranumber.rb
===================================================================
--- branches/ruby-oci8-1.0/test/test_oranumber.rb	2008-04-27 12:49:45 UTC (rev 262)
+++ branches/ruby-oci8-1.0/test/test_oranumber.rb	2008-06-24 09:36:18 UTC (rev 263)
@@ -2,7 +2,7 @@
 require 'oci8'
 require 'runit/testcase'
 require 'runit/cui/testrunner'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestOraNumber < RUNIT::TestCase
 




More information about the ruby-oci8-commit mailing list