freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD
- Date: Tue, 18 Sep 2007 15:32:57 -0400
Amanda Wise wrote:
> In reference to my previous email, I found the link to the original
> topic from July 2003.
>
> https://lists.ibiblio.org/sympa/arc/freetds/2003q3/013444.html
I don't believe that post is related to the problem you're having.
> I have narrowed down the problem to the following places using GDB:
>
> For SETUSER:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1208211776 (LWP 30863)]
Is there any chance you have two threads using the same DBPROCESS? Does
the problem occur if thread support is disabled at configure time?
What version of FreeTDS are we talking about?
> tds_dstr_copy (s=0x6373748a, src=0xbffd0700 "XXXXX\t") at
> tdsstring.c:126
^^ I don't think a
username can have a tab character, but that won't cause a problem for the
library. It will only prevent the server from matching the string you're
passing to any valid username.
>
> 126 if (*s != (DSTR) &tds_str_empty)
> #0 tds_dstr_copy (s=0x6373748a, src=0xbffd0700 "XXXXX\t")
> at tdsstring.c:126
> #1 0x00325e2a in tds_set_user (tds_login=0x63737462,
> username=0xbffd0700 "XXXXX\t") at login.c:94
> #2 0x003106ec in dbsetlname (login=0xbffd0500, value=0xbffd0700
> #"XXXXX\t",
> which=2) at dblib.c:441
> #3 0x0804f0a9 in DBConnection::connect (this=0xbffd0500)
> at DBConnection.cpp:59
> #4 0x0805d8b0 in main (argc=1, argv=0xbffd0d94) at Main_parse.cpp:16
I don't see the source of the segfault. s and src are not NULL; you
should be able to dereference s. Since you're in the debugger anyway, do
you see any reason *s or &tds_str_empty can't be evaluated?
There's no systemic problem setting usernames and passwords in db-lib.
For example, you should be able to run the db-lib unit tests successfully,
and that's what they do.
--jkl
-
[freetds] Segmentation fault in DBLIB - SETUSER/SETPWD,
Amanda Wise, 09/18/2007
- <Possible follow-up(s)>
-
[freetds] Segmentation fault in DBLIB - SETUSER/SETPWD,
Amanda Wise, 09/18/2007
- Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD, James K. Lowden, 09/18/2007
-
Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD,
Frediano Ziglio, 09/19/2007
-
Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD,
Amanda Wise, 09/19/2007
-
Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD,
ZIGLIO, Frediano, VF-IT, 09/20/2007
-
Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD,
Amanda Wise, 09/20/2007
-
Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD,
ZIGLIO, Frediano, VF-IT, 09/20/2007
- Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD, Amanda Wise, 09/20/2007
-
Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD,
ZIGLIO, Frediano, VF-IT, 09/20/2007
-
Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD,
Amanda Wise, 09/20/2007
-
Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD,
James K. Lowden, 09/20/2007
- Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD, Amanda Wise, 09/20/2007
-
Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD,
ZIGLIO, Frediano, VF-IT, 09/20/2007
-
Re: [freetds] Segmentation fault in DBLIB - SETUSER/SETPWD,
Amanda Wise, 09/19/2007
Archive powered by MHonArc 2.6.24.