Embedded SQL library bug

From: David Flater <dflater(at)nist(dot)gov>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Embedded SQL library bug
Date: 2004-05-21 21:03:40
Message-ID: 20040521210340.GA24507@cme.nist.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : David Flater
Your email address : dflater(at)nist(dot)gov

System Configuration
---------------------
Architecture (example: Intel Pentium) : Sun Ultrasparc 60

Operating System (example: Linux 2.4.18) : SunOS 5.8

PostgreSQL version (example: PostgreSQL-7.4.2): PostgreSQL-7.4.2

Compiler used (example: gcc 2.95.2) : gcc 3.2

Please enter a FULL description of your problem:
------------------------------------------------

In Embedded SQL, sometimes get segmentation faults on selecting part
or all of a float8[] array into a char array.

(gdb) where
#0 0xff233da0 in strncpy () from /usr/lib/libc.so.1
#1 0xff376780 in ECPGget_data () from /private/pgsql/lib/libecpg.so.4
#2 0xff37345c in ECPGstore_result () from /private/pgsql/lib/libecpg.so.4
#3 0xff374cc8 in ECPGexecute () from /private/pgsql/lib/libecpg.so.4
#4 0xff3751dc in ECPGdo () from /private/pgsql/lib/libecpg.so.4
#5 0x00010a58 in main (argc=1, argv=0xffbef384) at crashme.pgc:45

The attached example reproduces the failure on PostgreSQL 7.4.2 under
Solaris. The problem was also experienced by a colleague who was
using Linux but I haven't tested the example under Linux.

Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

I have attached a tar file containing a program, makefile, and log of
my results.

Do this:

createdb crashme
make
./crashme

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

N/A

--
David Flater, National Institute of Standards and Technology, U.S.A.

Attachment Content-Type Size
bug.tar.gz application/x-tar-gz 1.7 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Meskes 2004-05-22 11:26:43 Re: Embedded SQL library bug
Previous Message PAviles 2004-05-21 20:15:07 A memory leak. Postgres 7.4. Mac OS. X Server