Skip site navigation (1) Skip section navigation (2)

Strange problem with ecpg

From: theofilu(at)eunet(dot)at (Theofilu Andreas)
To: pgsql-bugs(at)postgresql(dot)org
Subject: Strange problem with ecpg
Date: 1999-09-11 13:38:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
                        POSTGRESQL BUG REPORT TEMPLATE

Your name		: Andreas Theofilu	
Your email address	: theofilu(at)eunet(dot)at

System Configuration
  Architecture (example: Intel Pentium)  	: Intel Pentium

  Operating System (example: Linux 2.0.26 ELF) 	: Linux 2.2.7 ELF

  Distribution                                  : SuSE 6.1

  PostgreSQL version (example: PostgreSQL-6.5.1):   PostgreSQL-6.5.1

  Compiler used (example:  gcc 2.8.0)		: egcs-2.91.66

Please enter a FULL description of your problem:
Following error seems to occur only on Linux with (libc-6).
While preprocessing a particular file with 'ecpg', the preprocessor crashes
with a segmentation fault (signal 11). I tried to trace down the problem
and found that it must be into libc library. However. I'm not so sure about
this. The problem occures here only with one particular file. This file is
attached to this mail.

I rebuild 'ecpg' with debugging options enabled. Following is the backtrace
of the debugger 'gdb':

$ gdb /usr/lib/pgsql/bin/ecpg core
GNU gdb with Linux support
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
welcome to change it and/or distribute copies of it under certain
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Core was generated by `ecpg -o print.c print.ecp'.
Program terminated with signal 11, Speicherzugriffsfehler.
Reading symbols from /lib/
Reading symbols from /lib/
Reading symbols from /lib/
Reading symbols from /lib/
Reading symbols from /usr/lib/
Reading symbols from /lib/
Reading symbols from /lib/
Reading symbols from /lib/
#0  chunk_alloc (ar_ptr=0x40150300, nb=32) at malloc.c:2721
malloc.c:2721: Datei oder Verzeichnis nicht gefunden.
(gdb) backtrace
#0  chunk_alloc (ar_ptr=0x40150300, nb=32) at malloc.c:2721
#1  0x400f5d15 in __libc_malloc (bytes=21) at malloc.c:2561
#2  0x8058f2c in mm_alloc (len=21) at type.c:11
#3  0x804a32c in cat5_str (str1=0x80db1f0 "select", str2=0x80daf88 "", 
    str3=0x80db1c0 "*", str4=0x80db1d0 "", str5=0x80db2a8 "from disk")
    at preproc.y:527
#4  0x804eb4a in yyparse () at preproc.y:2864
#5  0x8059be8 in main (argc=4, argv=0xbffff544) at ecpg.c:215

Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible: 
Try to preprocess the attached file with 'ecpg'. You should have installed and you should try it on an Intel Pentium.

I tried the same on Solaris 2.6 x86 and it worked well. No problems!
I hope this error is reproduceable on an other system too. Have no other
Linux here to try.

If you know how this problem might be fixed, list the solution below:
Sorry no fix known.

pgsql-bugs by date

Next:From: .ELTHDate: 1999-09-11 19:30:07
Subject: WWW.CDBUTIKEN.COM - Nyhetsbrev vecka 37
Previous:From: Theofilu AndreasDate: 1999-09-11 13:15:56
Subject: POSTGRESQL bug report

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group