| Issue 113: | python segfaults when using Easysoft ODBC Driver | |
| Back to list |
The code I have below will crash when using Easysofts ODBC-SQL Server driver but performs fine using freetds ODBC driver
import pyodbc
conn = pyodbc.connect('DSN=MYDSN")
curs = conn.cursor()
curs.execute('select * from mytable')
row = curs.fetchone()
print row
# this is the point where it will segfault.
I ran this same code using gdb and I get the following backtrace.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46928339233648 (LWP 27817)]
PyObject_Repr (v=0x54552e53555f6e65) at Objects/object.c:371
371 else if (Py_TYPE(v)->tp_repr == NULL)
(gdb) bt
#0 PyObject_Repr (v=0x54552e53555f6e65) at Objects/object.c:371
#1 0x00002aae5b59380f in Row_repr (o=<value optimized out>)
at/pyodbc-2.1.7/src/row.cpp:227
#2 0x0000000000417cdd in PyObject_Call (func=0x2aae5c67cf90,
arg=0x2aae5a843050, kw=0x0) at Objects/abstract.c:2492
#3 0x000000000048f767 in PyEval_EvalFrameEx (f=0x832d80,
throwflag=<value optimized out>) at Python/ceval.c:3924
#4 0x00000000004963a5 in PyEval_EvalCodeEx (co=0x2aae5b009738,
globals=<value optimized out>, locals=<value optimized out>, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
at Python/ceval.c:2968
#5 0x00000000004963e2 in PyEval_EvalCode (co=0x54552e53555f6e65,
globals=0x68c140, locals=0x2aae5c40c010) at Python/ceval.c:522
#6 0x00000000004b7f46 in PyRun_InteractiveOneFlags (fp=0x2aae5afd06c0,
filename=0x5043c9 "<stdin>", flags=0x7fff502a1ed0)
at Python/pythonrun.c:1335
#7 0x00000000004b8164 in PyRun_InteractiveLoopFlags (fp=0x2aae5afd06c0,
filename=0x5043c9 "<stdin>", flags=0x7fff502a1ed0)
at Python/pythonrun.c:760
#8 0x00000000004b893a in PyRun_AnyFileExFlags (fp=0x2aae5afd06c0,
filename=0x5043c9 "<stdin>", closeit=0, flags=0x7fff502a1ed0)
at Python/pythonrun.c:729
#9 0x0000000000413e1c in Py_Main (argc=<value optimized out>,
argv=0x7fff502a1ff8) at Modules/main.c:599
#10 0x00002aae5adb3184 in __libc_start_main () from /lib64/libc.so.6
#11 0x0000000000413099 in _start ()
As I mentioned previously this code executes correctly with FreeTDS
TDS Version=8.0
I'm running this on x86_64 linux.
Aug 9, 2010
#1
jason.s.holmes
Aug 26, 2010
From your second comment, I assume this should be closed? If not, please reopen.
Status:
Invalid
Nov 21, 2010
(No comment was entered for this change.)
Status:
NoFix
|