> limit coredumpsize 50M
> createdb crashme
CREATE DATABASE
> ./crashme
variable numbers[10000] is:
{0.016,0.216,0.07,0.035,0.011,1.211,0,0,0,0,0.28,0.042,0.174,0.01,0.067,0.035,0.005,0.002,0.016,0.277,0,0,0.02,0.01,0.042,0.052,0.007,0,0,0,0,0,0,0,0,0.202,0.038,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
CONNECT TO crashme
CREATE TABLE KABOOM (POW float8[] not null)
INSERT INTO KABOOM VALUES (:numbers)
Segmentation violation happens on next statement:
SELECT POW INTO :numbers FROM KABOOM;
Segmentation fault (core dumped)
> gdb -c core crashme
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8"...
Core was generated by `./crashme'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /private/pgsql/lib/libecpg.so.4...done.
Loaded symbols for /private/pgsql/lib/libecpg.so.4
Reading symbols from /private/pgsql/lib/libpq.so.3...done.
Loaded symbols for /private/pgsql/lib/libpq.so.3
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /depot/pub/gcc-3.2/arch.sunos5.8/lib/libgcc_s.so.1...done.
Loaded symbols for /depot/pub/gcc-3.2/arch.sunos5.8/lib/libgcc_s.so.1
Reading symbols from /private/pgsql/lib/libpgtypes.so.1...done.
Loaded symbols for /private/pgsql/lib/libpgtypes.so.1
Reading symbols from /usr/lib/libm.so.1...done.
Loaded symbols for /usr/lib/libm.so.1
Reading symbols from /usr/lib/libresolv.so.2...done.
Loaded symbols for /usr/lib/libresolv.so.2
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1...done.
Loaded symbols for /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
#0  0xff233da0 in strncpy () from /usr/lib/libc.so.1
(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
#6  0x000106e8 in .nope ()
Cannot access memory at address 0x2e30306d
(gdb)
