[freetds] segmentation fault when null field encountered

Adam Perks adamperks81 at gmail.com
Thu Jul 13 01:38:18 EDT 2006


OK, here is the backtrace:

(gdb) bt
#0  0x0000003d82473da6 in memcpy () from /lib64/libc.so.6
#1  0x0000000000516c07 in _estrndup ()
#2  0x00002aaaadc46b58 in zif_odbc_result () from 
/usr/lib64/php/modules/odbc.so
#3  0x000000000054a227 in zend_do_fcall_common_helper ()
#4  0x0000000000558740 in zend_do_fcall_handler ()
#5  0x0000000000547bda in execute ()
#6  0x0000000000529baa in zend_execute_scripts ()
#7  0x00000000004f61aa in php_execute_script ()
#8  0x000000000055eff5 in main ()
(gdb)

Thanks,

Adam


----- Original Message ----- 
From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio at vodafone.com>
To: "Adam Perks" <adamperks81 at gmail.com>; "FreeTDS Development Group" 
<freetds at lists.ibiblio.org>
Sent: Thursday, July 13, 2006 1:17 AM
Subject: RE: [freetds] segmentation fault when null field encountered


>
> Hi here is the gdb debugger output:
>
> Core was generated by `php gmtest.php'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /lib64/libcrypt.so.1...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libcrypt.so.1
> Reading symbols from /lib64/libnsl.so.1...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libnsl.so.1
> Reading symbols from /usr/lib64/libaspell.so.15...(no
> debugging symbols
> found)...done.
> Loaded symbols for /usr/lib64/libaspell.so.15
> Reading symbols from /usr/lib64/libpspell.so.15...(no
> debugging symbols
> found)...done.
> Loaded symbols for /usr/lib64/libpspell.so.15
> Reading symbols from /lib64/libpcre.so.0...
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libpcre.so.0
> Reading symbols from /usr/lib64/libgmp.so.3...(no debugging symbols
> found)...done.
> Loaded symbols for /usr/lib64/libgmp.so.3
> Reading symbols from /lib64/tls/libdb-4.3.so...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/tls/libdb-4.3.so
> Reading symbols from /usr/lib64/libcurl.so.3...(no debugging symbols
> found)...done.
> Loaded symbols for /usr/lib64/libcurl.so.3
> Reading symbols from /usr/lib64/libbz2.so.1...
> (no debugging symbols found)...done.
> Loaded symbols for /usr/lib64/libbz2.so.1
> Reading symbols from /usr/lib64/libz.so.1...(no debugging symbols
> found)...done.
> Loaded symbols for /usr/lib64/libz.so.1
> Reading symbols from /lib64/libresolv.so.2...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libresolv.so.2
> Reading symbols from /lib64/libm.so.6...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libm.so.6
> Reading symbols from /lib64/libdl.so.2...
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libdl.so.2
> Reading symbols from /usr/lib64/libxml2.so.2...(no debugging symbols
> found)...done.
> Loaded symbols for /usr/lib64/libxml2.so.2
> Reading symbols from /usr/lib64/libgssapi_krb5.so.2...(no
> debugging symbols
> found)...done.
> Loaded symbols for /usr/lib64/libgssapi_krb5.so.2
> Reading symbols from /usr/lib64/libkrb5.so.3...(no debugging symbols
> found)...done.
> Loaded symbols for /usr/lib64/libkrb5.so.3
> Reading symbols from /usr/lib64/libk5crypto.so.3...
> (no debugging symbols found)...done.
> Loaded symbols for /usr/lib64/libk5crypto.so.3
> Reading symbols from /lib64/libcom_err.so.2...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libcom_err.so.2
> Reading symbols from /lib64/libssl.so.5...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libssl.so.5
> Reading symbols from /lib64/libcrypto.so.5...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libcrypto.so.5
> Reading symbols from /usr/lib64/libkrb5support.so.0...
> (no debugging symbols found)...done.
> Loaded symbols for /usr/lib64/libkrb5support.so.0
> Reading symbols from /usr/lib64/libidn.so.11...(no debugging symbols
> found)...done.
> Loaded symbols for /usr/lib64/libidn.so.11
> Reading symbols from /lib64/libc.so.6...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libc.so.6
> Reading symbols from /usr/lib64/libstdc++.so.6...(no
> debugging symbols
> found)...done.
> Loaded symbols for /usr/lib64/libstdc++.so.6
> Reading symbols from /lib64/libgcc_s.so.1...
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libgcc_s.so.1
> Reading symbols from /lib64/libpthread.so.0...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libpthread.so.0
> Reading symbols from /lib64/ld-linux-x86-64.so.2...(no
> debugging symbols
> found)...done.
> Loaded symbols for /lib64/ld-linux-x86-64.so.2
> Reading symbols from /lib64/libnss_files.so.2...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libnss_files.so.2
> Reading symbols from /usr/lib64/php/modules/mysql.so...
> (no debugging symbols found)...done.
> Loaded symbols for /usr/lib64/php/modules/mysql.so
> Reading symbols from
> /usr/lib64/mysql/libmysqlclient.so.14...(no debugging
> symbols found)...done.
> Loaded symbols for /usr/lib64/mysql/libmysqlclient.so.14
> Reading symbols from /usr/lib64/php/modules/mysqli.so...(no debugging
> symbols found)...done.
> Loaded symbols for /usr/lib64/php/modules/mysqli.so
> Reading symbols from /usr/lib64/php/modules/odbc.so...(no
> debugging symbols
> found)...done.
> Loaded symbols for /usr/lib64/php/modules/odbc.so
> Reading symbols from /usr/lib64/libodbc.so.1...
> (no debugging symbols found)...done.
> Loaded symbols for /usr/lib64/libodbc.so.1
> Reading symbols from /usr/lib64/libodbcpsql.so.2...(no
> debugging symbols
> found)...done.
> Loaded symbols for /usr/lib64/libodbcpsql.so.2
> Reading symbols from /lib64/libnss_compat.so.2...(no
> debugging symbols
> found)...done.
> Loaded symbols for /lib64/libnss_compat.so.2
> Reading symbols from /lib64/libnss_nis.so.2...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libnss_nis.so.2
> Reading symbols from /usr/lib64/gconv/ISO8859-1.so...
> (no debugging symbols found)...done.
> Loaded symbols for /usr/lib64/gconv/ISO8859-1.so
> Reading symbols from /usr/local/lib/libtdsodbc.so...done.
> Loaded symbols for /usr/local/lib/libtdsodbc.so
> Reading symbols from /usr/local/lib/libodbcinst.so.1...done.
> Loaded symbols for /usr/local/lib/libodbcinst.so.1
> Reading symbols from /lib64/libnss_dns.so.2...done.
> Loaded symbols for /lib64/libnss_dns.so.2
> Reading symbols from /usr/lib64/gconv/CP1252.so...done.
> Loaded symbols for /usr/lib64/gconv/CP1252.so
> #0  0x0000003d82473da6 in memcpy () from /lib64/libc.so.6
>
> Regards,
> Adam
>

Thanks, but you miss the most important command, "bt" under gdb :) This
will explain to us where the error occurs and who call the function...

freddy77




More information about the FreeTDS mailing list