freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
- To: <freetds AT lists.ibiblio.org>
- Subject: [freetds] efence and crash...
- Date: Fri, 17 Oct 2003 17:20:23 +0200
I can understand why this happen!!!
I'm testing FreeTDS with ElectricFence and I get an error like a heap
corruption however I don't understand where the bug is.
Working very hard I reduced program to this (it use only libTDS)
int
main(int argc, char **argv)
{
TDSLOGIN *login;
TDSSOCKET *tds;
TDSCONTEXT *my_context;
printf("line %d\n", __LINE__);
my_context = tds_alloc_context();
tds = tds_alloc_socket(NULL, 512);
tds_get_homedir();
tds->major_version = 7;
tds->minor_version = 0;
tds_iconv_open(tds, "ISO8859-1");
// tds_put_string(tds, test, strlen(test));
printf("line %d\n", __LINE__);
tds_free_socket(tds);
printf("line %d\n", __LINE__);
tds_free_context(my_context);
printf("line %d\n", __LINE__);
return 0;
}
Enabling efence (LD_PRELOAD=efence.so.0.0) under Linux (only with
EF_PROTECT_FREE=1) it crashes ...
Commenting tds_get_homedir line or tds_free_context line or
tds_iconv_open line or free(locale) line in mem.c it doesn't !!!
freddy77
-
[freetds] efence and crash...,
ZIGLIO Frediano, 10/17/2003
- <Possible follow-up(s)>
- RE: [freetds] efence and crash..., ZIGLIO Frediano, 10/20/2003
Archive powered by MHonArc 2.6.24.