[freetds] freetds 0.61/src/dblib/unittests/t0001 core dump on HP-UX 11.0 when login to MS SQL Server 6.5

Frediano Ziglio freddyz77 at tin.it
Fri Apr 4 04:49:22 EST 2003


Il ven, 2003-04-04 alle 08:45, MD32 SHYeh3 ha scritto:
> Hi:
>   1. I try the dblib library unittests/t0001 and get code dump.(login to MS SQL Server 6.5)
>     $ pwd
> /usr18/users/freetds/freetds-0.61/src/dblib/unittests
> $ ls -al t0001*
> -rwxr-xr-x   1 freetds    users         3603 Apr  4 14:18 t0001
> -rw-r--r--   1 freetds    users         4005 Dec 14 22:47 t0001.c
> -rw-rw-rw-   1 freetds    users        53904 Apr  4 14:18 t0001.o
> 
> $ t0001
> found wehqdbms51.devadc2 for adc2dbo in "../../../PWD"
> Start
> About to logon
> About to open "wehqdbms51"
> Bus error(coredump)
> 
>    2.Then I write a simple c program(see winf_sql.c) using db-lib to login MS SQL Server 6.5 and get following output:
> $ winf_sql
> start...
> end...
> start dblogin...
> end dblogin...
> start dbsetluser...
> end dbsetluser...
> start dbopen...
> Bus error(coredump)
> 
>   3.Using gdb to debug:
> 
> $ /usr18/users/ddd/gdb winf_sql
> GNU gdb 5.3
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "hppa1.1-hp-hpux11.00"...
> (gdb) run
> Starting program: /usr18/users/source/test/T1/winf_sql
> start...
> end...
> start dblogin...
> end dblogin...
> start dbsetluser...
> end dbsetluser...
> start dbopen...
> 
> Program received signal SIGBUS, Bus error.
> 0x7b0174dc in getpwuid_r () from /usr/lib/libc.2
> (gdb) bt
> #0  0x7b0174dc in getpwuid_r () from /usr/lib/libc.2
> #1  0x000313e0 in tds_get_homedir () at threadsafe.c:235
> #2  0x00027cb0 in tds_get_home_file (file=0x3b9e0 ".freetds.conf")
>     at config.c:210
> #3  0x00027e84 in tds_read_conf_file (connect_info=0x4000d198,
>     server=0x4000ce88 "wehqdbms51") at config.c:247
> #4  0x000278e8 in tds_read_config_info (tds=0x0, login=0x4000c690,
>     locale=0x4000c650) at config.c:143
> #5  0x00007064 in tdsdbopen (login=0x4000c680, server=0x400010e0 "wehqdbms51")
>     at dblib.c:802
> #6  0x000050c8 in iAPLogin (sId=0x400010f8 "shyeh3",
>     sPassword=0x40001100 "shyeh3") at winf_sql.c:52
> #7  0x00005248 in main () at winf_sql.c:82
> (gdb)
>   

>From http://devrsrc1.external.hp.com/STKLI/man/11iv1.5/getpwent_3c.html
getpwuid_r have 5 parameters. FreeTDS seem to detect 4 parameters (see
threadsafe.c like 235). After configuring edit confih.h, define
HAVE_FUNC_GETPWUID_R_5 and undefine HAVE_FUNC_GETPWUID_R_4_PW and
HAVE_FUNC_GETPWUID_R_4. This should fix the problem...

I'll update acinclude.m4 to fix the configure problem (for 0.62).

freddy77




More information about the FreeTDS mailing list