[freetds] I'm having a crashing problem with FreeTDS under OSX
me at danielparnell.com
Sun Mar 8 07:07:01 EDT 2009
Here is the version output from gcc
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)
I wasn't aware that FreeTDS used it's own memory allocator.
I've not had any problems like this with any of the installs I've done
in the past (and I've done a lot of them).
On 08/03/2009, at 9:55 PM, Frediano Ziglio wrote:
> 2009/3/8 Daniel Parnell <me at danielparnell.com>:
>> 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
>> 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
>> It's very VERY strange that I should need to do this. I've tried
>> replicating the problem with a smaller application without success.
> Mmmm... this can be the problem
> does Mac OS X has asprintf ?? Try using only your tds_strdup.
> Reading at http://developer.apple.com/documentation/Darwin/Reference/Manpages/man3/asprintf.3.html
> it seems that same problem apply also to asprintf/vasprintf. They
> returns pointers malloc-ed with libc but if free is not from libc you
> get heap corruption. The solution is to use a tds_strdup (as you did)
> and say in configure that you don't have asprintf/vasprintf so FreeTDS
> will compile a version that use proper malloc.
> Which compiler are you using?
> Another solution would be to link FreeTDS with libc malloc/free.
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
More information about the FreeTDS