platiumky / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

Segmentation Fault when adding more than 6 output converter functions to a connection #345

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. cnx = connect(....)
2. cnx.add_output_converter(n, lambda x:x) # for n in range(101,113)
3. csr = cnx.cursor()
4. csr.execute('select * from any_table')
5. csr.fetchall()

What is the expected output? What do you see instead?
The program should complete without any errors. Instead, program terminates 
abnormally with a segmentation fault

What version of the product are you using? On what operating system?
3.0.6 on Linux (Chakra)

Please provide any additional information below.
This bug is related to Issue #168. There are 13 standard INTERVAL types defined 
by ODBC. Since pyodbc doesn't support INTERVAL data types yet; I am having to 
register 13 output converter functions. There seems to be an internal limit of 
6, after which program segfaults.

Original issue reported on code.google.com by pad...@gmail.com on 1 Nov 2013 at 9:18

GoogleCodeExporter commented 8 years ago
Hi!

I can confirm it. The error is:

*** Error in `/usr/bin/python': free(): invalid next size (fast): 
0x00000000013b76c0 ***
Aborted (core dumped)

python: 2.7.6 (default, Mar 22 2014, 22:59:56) \n[GCC 4.8.2]
pyodbc version: '3.0.7'
OSUbuntu: 14.04.2 LTS
kernel: 3.13.0-49-generic

Original comment by D.Leybov...@gmail.com on 13 Apr 2015 at 4:10