Skip to Content.
Sympa Menu

freetds - RE: [freetds] current_results...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] current_results...
  • Date: Thu, 2 Dec 2004 13:47:35 +0100

>
> "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com> wrote:
> > "Assertion `result_found || tds->current_results == ((void
> *)0)' failed"
> > means that current_results do not point to any known data.
> From gdb you
> > can see that current_results point to a buffer however we
> can find this
> > buffer in res_info, param_info, compute, cursors or
> dynamic... I always
> > though that current_results should point to one of these members...
> > valgrind prove that there is no memory leaks however I
> don't understand
> > how this can happen....
>
> Couldn't that be:
>
> result_found || tds->current_results == NULL
>
> just as well? That should be legal C everywhere.
>

Well this in my environment (Linux FC2) it's expanded to
"result_found || tds->current_results == ((void *)0)"

> You don't need a memory leak for this to happen. If you free
> the memory,
> and don't set the pointer to NULL, the assertion will fail.
> Maybe if we
> used TDS_ZERO_FREE more consistently, that wouldn't happen.
> (Not that I
> do, but still.)
>

In this case tds->current_results points but not own the pointer (it's
an alias) so freeing it it's wrong. It was a pointer to garbage (which
it's not that correct and can lead to corruption). It's now fixed in CVS
(0.64). It do not seems to cause problem in 0.63...

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page