[redland-dev] [PATCH] rdf_storage_virtuoso.c: Fix seg. fault on x86_64 machines

lenrek at me.com lenrek at me.com
Thu Dec 3 06:18:23 CET 2009


A test program "redland-virtuoso-test" caused Virtuoso to crash.
I used librdf (rev. 15752) built on my x86_64 machine.
Here a patch to fix the problem will be enclosed.


diff -crN svn/librdf/src/rdf_storage_virtuoso.c librdf/src/ 
rdf_storage_virtuoso.c
*** svn/librdf/src/rdf_storage_virtuoso.c	2009-11-20  
14:57:02.000000000 +0900
--- librdf/src/rdf_storage_virtuoso.c	2009-12-03 13:08:58.000000000  
+0900
***************
*** 821,826 ****
--- 821,828 ----
    librdf_storage_virtuoso_instance*  
context=(librdf_storage_virtuoso_instance*)LIBRDF_CALLOC(
      librdf_storage_virtuoso_instance, 1,  
sizeof(librdf_storage_virtuoso_instance));

+   storage->instance = context;
+
    int len=0;

    /* Must have connection parameters passed as options */
***************
*** 1281,1287 ****


  static int
! BindObject(librdf_storage* storage,  
librdf_storage_virtuoso_connection *handle, SQLUSMALLINT col,  
librdf_node *node, char **data, int *iData, SQLLEN *ind1, SQLLEN  
*ind2, SQLLEN *ind3)
  {
    librdf_node_type type=librdf_node_get_type(node);
    SQLUINTEGER ulen;
--- 1283,1289 ----


  static int
! BindObject(librdf_storage* storage,  
librdf_storage_virtuoso_connection *handle, SQLUSMALLINT col,  
librdf_node *node, char **data, long *iData, SQLLEN *ind1, SQLLEN  
*ind2, SQLLEN *ind3)
  {
    librdf_node_type type=librdf_node_get_type(node);
    SQLUINTEGER ulen;
***************
*** 1424,1430 ****
    librdf_node* nobject=NULL;
    SQLLEN ind, ind1, ind2;
    SQLLEN ind31, ind32, ind33;
!   int iData;

  #ifdef VIRTUOSO_STORAGE_DEBUG
    fprintf(stderr,  
"librdf_storage_virtuoso_context_add_statement_helper \n");
--- 1426,1432 ----
    librdf_node* nobject=NULL;
    SQLLEN ind, ind1, ind2;
    SQLLEN ind31, ind32, ind33;
!   long iData;

  #ifdef VIRTUOSO_STORAGE_DEBUG
    fprintf(stderr,  
"librdf_storage_virtuoso_context_add_statement_helper \n");
***************
*** 1675,1681 ****
    librdf_node* nobject=NULL;
    SQLLEN ind, ind1, ind2;
    SQLLEN ind31, ind32, ind33;
!   int iData;


  #ifdef VIRTUOSO_STORAGE_DEBUG
--- 1677,1683 ----
    librdf_node* nobject=NULL;
    SQLLEN ind, ind1, ind2;
    SQLLEN ind31, ind32, ind33;
!   long iData;


  #ifdef VIRTUOSO_STORAGE_DEBUG




More information about the redland-dev mailing list