From murdoch at stats.uwo.ca  Fri Oct 31 17:29:13 2008
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Fri, 31 Oct 2008 12:29:13 -0400
Subject: [Rd] *** buffer overflow detected ***: /usr/lib64/R/bin/exec/R
 terminated on R 2.6.2 to 2.8.0: logging a bug?
In-Reply-To: <200810311509.07280.ct529@york.ac.uk>
References: <200810311117.17677.ct529@york.ac.uk>	<490AFF2B.2020209@biostat.ku.dk>	<alpine.LFD.2.00.0810311401070.17003@gannet.stats.ox.ac.uk>
	<200810311509.07280.ct529@york.ac.uk>
Message-ID: <490B3259.9020200@stats.uwo.ca>

On 10/31/2008 11:09 AM, Corrado wrote:
> Dear friends,
> 
> the problem is on a postgresql 8.3.1 database on a 64 platform (the setting 
> described at the bottom of the previous email).
> 
> If the problems is with the odbc driver, why do the other applications connect 
> through odbc to the same databases without any problem? I do not think it is 
> possible ....

See Prof. Ripley's message.  RODBC is passing a buffer and buffer size 
to the ODBC driver, and that driver is overflowing the buffer.  You 
could probably hide this bug by making the buffer larger, but the real 
fix is for the driver to take account of the buffer size it is being given.

Duncan Murdoch

> 
> I have been able to connect easily to postgresql databases using previous 
> versions of RODBC (that is, before 1.2.3).
> 
> Could it be a problem with the compilation flags (CFLAGS)?
> 
> As for the steps: as user postgres create a database called test, create a 
> dsn, launch R, call the library RODBC, use odbcConnect => buffer overflow. I 
> thought they were already described in the original email.
> 
> Here is the odbc.ini for the dsn:
> 
> [test]
> Description             = PostgreSQL
> Driver          		= PostgreSQL
> Trace          		 = Yes
> TraceFile               = /tmp/sql.log
> Database                = test
> Servername              = localhost
> Username                = postgres
> Password                = none
> Port            = 5432
> ReadOnly                = No
> RowVersioning           = No
> ShowSystemTables                = No
> ShowOidColumn           = No
> FakeOidIndex            = No
> ConnSettings            =
> 
> 
> Best,



[Rd] *** buffer overflow detected ***: /usr/lib64/R/bin/exec/R terminated on R 2.6.2 to 2.8.0: logging a bug?
Duncan Murdoch