w1nk / node-odbc

unixODBC bindings for node
MIT License
90 stars 102 forks source link

Segfault on SQLBindParameter (32bit Centos) #76

Open stevenwood2014 opened 10 years ago

stevenwood2014 commented 10 years ago

When I attempt to pass any parameters for binding via query or querySync I get a segfault. I've been able to track it down as far as a call to SQLBindParameter in odbc_connection.cpp (line 1129). I have the latest ibm_db module installed.

I do notice that by default in the bindings.gyp ODBC64 is defined, which I would assume should not be there, or should be something else for a 32 bit system. However if I change it or remove it, the code will not compile with various conversion errors.

Any help here would be much appreciated.

Running against/using DB2/Informix. Centos 32bit v5.4 Linux 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux

DEBUG + Basic Stack Trace

ODBCConnection::QuerySync ODBC::GetParametersFromArray ODBC::GetParametersFromArray - &param[0].length = 9E3C320 ODBC::GetParametersFromArray - IsString(): params[0] c_type=-8 type=-9 buffer_length=22 size=0 length=22 value=(null) ODBCConnection::QuerySync - hSTMT=0x20001 ODBCConnection::UV_Query - param[0]: c_type=-8 type=-9 buffer_length=22 size=0 length=22 &length=0 Error: signal 11: node_modules/ibm_db/build/Release/odbc_bindings.node(_Z7handleri+0x1f)[0xe0392f] [0xa88420] csdk-4.10.FC4DE/IBM_Data_Server_Driver_Package/dsdriver/./lib32/libdb2.so.1(_Z11SQLExecute2P17CLI_STATEMENTINFOP19CLI_ERRORHEADERINFO+0x1a6)[0x18faa06] csdk-4.10.FC4DE/IBM_Data_Server_Driver_Package/dsdriver/./lib32/libdb2.so.1(SQLExecute+0x46f)[0x18f8b1f] node_modules/ibm_db/build/Release/odbc_bindings.node(_ZN14ODBCConnection9QuerySyncERKN2v89ArgumentsE+0xb10)[0xe08220] node[0x83332cf] [0x2e50a376] [0x5e751e32] [0x5e751923] [0x5e754b9e]

bzuillsmith commented 9 years ago

Are you still actively using node-odbc? Is this still a problem? A lot of changes have been made since this issue. Can you reproduce in 1.0.x?