patch to the users who use BLOB of ruby-oci8

K

KUBO Takehiro

Hi,

If you use BLOB of ruby-oci8, please apply the following patch.
If garbage collection runs while using BLOB, BLOB will be
freed, and then next 'fetch' occurs a segmentation fault. :-<

This problem was reported by Nishishiro-san.
I'll release ruby-oci8 0.1.6 at the next weekend.

--- src/handle.c~ 2003-02-24 06:18:37.000000000 +0900
+++ src/handle.c 2003-09-15 22:05:35.000000000 +0900
@@ -100,6 +100,7 @@

static void oci8_handle_mark(oci8_handle_t *h)
{
+ oci8_bind_handle_t *bh;
int i;

switch (h->type) {
@@ -121,6 +122,12 @@
}
}
break;
+ case OCI_HTYPE_DEFINE:
+ case OCI_HTYPE_BIND:
+ bh = (oci8_bind_handle_t *)h;
+ if (bh->bind_type == BIND_HANDLE)
+ rb_gc_mark(bh->value.v);
+ break;
}
if (h->parent != NULL) {
rb_gc_mark(h->parent->self);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,129
Messages
2,570,770
Members
47,329
Latest member
FidelRauch

Latest Threads

Top