bug-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-glpk] Aborted (core dumped) - when SQLDriverConnect fails


From: Xypron
Subject: [Bug-glpk] Aborted (core dumped) - when SQLDriverConnect fails
Date: Thu, 02 Oct 2008 21:48:36 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17) Gecko/20080829 SeaMonkey/1.1.12

Hello Andrew,

when the ODBC driver cannot connect the database I receive an error like:

The driver reported the following diagnostics whilst running SQLDriverConnect

IM002:1:0:[iODBC][Driver Manager]Data source name not found and no default 
driver specified. Driver could not be loaded

test.mod:82: error on opening table tb

Model processing error

Assertion failed: count == 0

Error detected in file glplpx17.c at line 1220

Aborted (core dumped)


It is due to a missing xfree.

Please, apply the following patch:
http://glpk.dyndns.org/viewvc/svn/glpk/glpk/branches/glpk-4.31-segmentation_fault/src/glpsql.c?view=diff&r1=290&r2=289&diff_format=h <http://glpk.dyndns.org/viewvc/svn/glpk/glpk/branches/glpk-4.31-segmentation_fault/src/glpsql.c?view=diff&r1=290&r2=289&diff_format=h>
(see appendix)

Best regards
Xypron

--- glpk/glpk/branches/glpk-4.31-segmentation_fault/src/glpsql.c        
2008/09/28 18:18:21     289
+++ glpk/glpk/branches/glpk-4.31-segmentation_fault/src/glpsql.c        
2008/10/02 19:37:50     290
@@ -604,6 +604,7 @@
       extract_error("SQLDriverConnect", sql->hdbc, SQL_HANDLE_DBC);
       dl_SQLFreeHandle(SQL_HANDLE_DBC, sql->hdbc);
       dl_SQLFreeHandle(SQL_HANDLE_ENV, sql->henv);
+      xfree(sql);
       return NULL;
    }
    /* set AUTOCOMMIT on*/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]