Skip to Content.
Sympa Menu

freetds - RE: [freetds] [PATCH] Fix segfault when triggering aforeignkeyvio lation

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] [PATCH] Fix segfault when triggering aforeignkeyvio lation
  • Date: Mon, 12 Jan 2004 16:22:18 -0500

> From: ZIGLIO Frediano [mailto:Frediano.Ziglio AT vodafone.com]
> Sent: January 12, 2004 11:57 AM
> > > > When such an aforementioned error is triggered the database
> > > > sends a EED token which gets processed by tds_process_msg().
> > > > When the status byte of the EED message is set to 1,
> > > > additional error data follows; freetds fails to read this
> > > > data from wire - which appears to let sqsh think it must read
> > > > data and thus causing it to segfault.
> > > >
> > > > The attached patch fixes this bug
> > >
> > > this patch was included in 0.62 however I do not agree...
> >
> > What to do? It seems we need to read the extended error data
> > AND leave the stream in IDLE state. If we come up with a way
> > to do that fairly soon, we can apply it to the 0.62 branch as
> > well as the trunk. At some future point -- depending on how
> > critical this is (not clear, to me) -- we can release 0.62.1,
> > with or without other fixes.
> >
>
> Well, there are alreays less test cases than needed :)
>
> However now some dblib tests now fails (I used a mssql2k server):
> - t0001 fails
> - any other test that cause a error hangs...

I'm looking at revision 1.246. It looks like a very small change to the
logic, initializing has_eed = 0. Are you satisfied with the TDS state now?


I posted your change as a patch to 0.62 in stable/, and added a
README.patches explaining what it does and how to apply it. I intend to
keep that file, and to keep a .diff for any changes between point releases.
IOW, when we release 0.62.2, you'll see on the ftp server:

freetds-0.62.tar.gz
freetds-0.62.1.tar.gz
freetds-0.62.1.diff
freetds-0.62.2.tar.gz
freetds-0.62.2.diff

Where
freetds-0.62.1.tar.gz = freetds-0.62.tar.gz
+ freetds-0.62.1.diff
and
freetds-0.62.2.tar.gz = freetds-0.62.tar.gz
+ freetds-0.62.2.diff

That way, anyone trying to understand the meaning/purpose of the point
releases will know exactly how each one differs from the base.

If your RPMs will use token.c 1.246, perhaps I should release 0.62.1 at the
same time, with this one change.

--jkl
-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the original
message. Please note that we do not accept account orders and/or instructions
by e-mail, and therefore will not be responsible for carrying out such orders
and/or instructions.






Archive powered by MHonArc 2.6.24.

Top of Page