freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX
- From: Daniel Parnell <me AT danielparnell.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] I'm having a crashing problem with FreeTDS under OSX
- Date: Sun, 8 Mar 2009 17:05:35 +1100
Hi James,
Looks like I've got things working on my machine.
What I had to do was replace any calls to strdup with a new function tds_strdup.
I also have to replace the call to asprintf in odbc.c with sprintf into a character array and a tds_strdup (not too happy about that one).
It's very VERY strange that I should need to do this. I've tried replicating the problem with a smaller application without success.
Daniel
On 08/03/2009, at 3:10 AM, James K. Lowden wrote:
Hi Daniel,
I put some printfs in around the free and it appears to be pointing to
a valid date format.
That's interesting. I don't know anything about OS X heap management or
how an executable is arranged in memory. My instinct says 0x16 is too low
for the heap, and free(3) seems to agree.
Looking at the code, there are only a few places where data_fmt is set,
all of them output of calloc(3) or strdup(3). I'm sure you see the same
yourself. I don't see how FreeTDS could have set that pointer to anything
that can't be freed.
If I just comment out the free it then seems to fail on the next free
the code hits (and of course leaks;)
It is almost as if the heap is getting corrupted
The OS X tool vmmap(1) might be of some help here. I haven't used it
myself but it's in the right neighborhood.
I still suspect someone somewhere is trimming off the top 4 bytes of a
pointer and then having a party.
HTH.
--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
-
[freetds] I'm having a crashing problem with FreeTDS under OSX,
Daniel Parnell, 03/04/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
James K. Lowden, 03/05/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
Daniel Parnell, 03/05/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
James K. Lowden, 03/06/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Frediano Ziglio, 03/06/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
Daniel Parnell, 03/06/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
James K. Lowden, 03/07/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Daniel Parnell, 03/07/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Daniel Parnell, 03/07/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
Daniel Parnell, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Frediano Ziglio, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Daniel Parnell, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Frediano Ziglio, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Daniel Parnell, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, James K. Lowden, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Daniel Parnell, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Frediano Ziglio, 03/14/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Daniel Parnell, 03/16/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
James K. Lowden, 03/07/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
James K. Lowden, 03/06/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
Daniel Parnell, 03/05/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
James K. Lowden, 03/05/2009
Archive powered by MHonArc 2.6.24.