dbTalk Databases Forums  

free(): invalid pointer

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss free(): invalid pointer in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Van
 
Posts: n/a

Default free(): invalid pointer - 01-11-2006 , 06:17 AM






------_=_NextPart_001_01C61618.6818E148
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

=20

I'm using Fedora Core 4 with MySQL 4.1.16. I compiled and run resetdb =
successfully. =20

It created the sample database. Then I compiled simple1.cpp, but when I =
run it, it dumps this:

=20

[root@localhost examples]# ./simple1

Item Num Weight Price Date

=20

N=C3=BCrnberger Brats 92 1.5 8.79 2005-03-10

Pickle Relish 87 1.5 1.75 1998-09-04

Hot Mustard 75 0.95 0.97 1998-05-25

Hotdog Buns 65 1.1 1.1 1998-04-23

*** glibc detected *** ./simple1: free(): invalid pointer: 0x08947ab0 =
***

=3D=3D=3D=3D=3D=3D=3D Backtrace: =3D=3D=3D=3D=3D=3D=3D=3D=3D

/lib/libc.so.6[0x2df124]

/lib/libc.so.6(__libc_free+0x77)[0x2df65f]

/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0x2470a9]

/usr/lib/libmysqlpp.so.2(_ZN7mysqlpp3RowD1Ev+0x34d)[0xb404fd]

../simple1[0x804b6cf]

/lib/libc.so.6(__libc_start_main+0xdf)[0x290d5f]

../simple1(__gxx_personality_v0+0x91)[0x804afe5]

=3D=3D=3D=3D=3D=3D=3D Memory map: =3D=3D=3D=3D=3D=3D=3D=3D

00111000-00113000 r-xp 00000000 fd:00 47743104 /lib/libdl-2.3.5.so

00113000-00114000 r--p 00001000 fd:00 47743104 /lib/libdl-2.3.5.so

00114000-00115000 rw-p 00002000 fd:00 47743104 /lib/libdl-2.3.5.so

00115000-0011e000 r-xp 00000000 fd:00 47743028 =
/lib/libnss_files-2.3.5.so

0011e000-0011f000 r--p 00008000 fd:00 47743028 =
/lib/libnss_files-2.3.5.so

0011f000-00120000 rw-p 00009000 fd:00 47743028 =
/lib/libnss_files-2.3.5.so

001a0000-00272000 r-xp 00000000 fd:00 46010035 =
/usr/lib/libstdc++.so.6.0.7

00272000-00277000 rw-p 000d2000 fd:00 46010035 =
/usr/lib/libstdc++.so.6.0.7

00277000-0027c000 rw-p 00277000 00:00 0

0027c000-0039f000 r-xp 00000000 fd:00 47743070 /lib/libc-2.3.5.so

0039f000-003a1000 r--p 00123000 fd:00 47743070 /lib/libc-2.3.5.so

003a1000-003a3000 rw-p 00125000 fd:00 47743070 /lib/libc-2.3.5.so

003a3000-003a5000 rw-p 003a3000 00:00 0

0047a000-00494000 r-xp 00000000 fd:00 47743026 /lib/ld-2.3.5.so

00494000-00495000 r--p 00019000 fd:00 47743026 /lib/ld-2.3.5.so

00495000-00496000 rw-p 0001a000 fd:00 47743026 /lib/ld-2.3.5.so

004a6000-004eb000 r-xp 00000000 fd:00 47054887 =
/usr/lib/mysql/libmysqlclient.so.14.0.0

004eb000-005c5000 rw-p 00045000 fd:00 47054887 =
/usr/lib/mysql/libmysqlclient.so.14.0.0

005c5000-005c8000 rw-p 005c5000 00:00 0

005c9000-005ec000 r-xp 00000000 fd:00 47744059 /lib/libm-2.3.5.so

005ec000-005ed000 r--p 00022000 fd:00 47744059 /lib/libm-2.3.5.so

005ed000-005ee000 rw-p 00023000 fd:00 47744059 /lib/libm-2.3.5.so

005f0000-00602000 r-xp 00000000 fd:00 46010512 =
/usr/lib/libz.so.1.2.2.2

00602000-00603000 rw-p 00011000 fd:00 46010512 =
/usr/lib/libz.so.1.2.2.2

00619000-00628000 r-xp 00000000 fd:00 47743007 /lib/libresolv-2.3.5.so

00628000-00629000 r--p 0000e000 fd:00 47743007 /lib/libresolv-2.3.5.so

00629000-0062a000 rw-p 0000f000 fd:00 47743007 /lib/libresolv-2.3.5.so

0062a000-0062c000 rw-p 0062a000 00:00 0

00641000-00646000 r-xp 00000000 fd:00 47744064 /lib/libcrypt-2.3.5.so

00646000-00647000 r--p 00004000 fd:00 47744064 /lib/libcrypt-2.3.5.so

00647000-00648000 rw-p 00005000 fd:00 47744064 /lib/libcrypt-2.3.5.so

00648000-0066f000 rw-p 00648000 00:00 0

00671000-00673000 r-xp 00000000 fd:00 47744061 /lib/libcom_err.so.2.1

00673000-00674000 rw-p 00001000 fd:00 47744061 /lib/libcom_err.so.2.1

00756000-007c5000 r-xp 00000000 fd:00 46013966 /usr/lib/libkrb5.so.3.2

007c5000-007c8000 rw-p 0006e000 fd:00 46013966 /usr/lib/libkrb5.so.3.2

007ca000-007ed000 r-xp 00000000 fd:00 46013964 =
/usr/lib/libk5crypto.so.3.0

007ed000-007ee000 rw-p 00023000 fd:00 46013964 =
/usr/lib/libk5crypto.so.3.0

007f0000-007f2000 r-xp 00000000 fd:00 46013792 =
/usr/lib/libkrb5support.so.0.0

007f2000-007f3000 rw-p 00001000 fd:00 46013792 =
/usr/lib/libkrb5support.so.0.0

007f5000-00807000 r-xp 00000000 fd:00 47744065 /lib/libnsl-2.3.5.so

00807000-00808000 r--p 00011000 fd:00 47744065 /lib/libnsl-2.3.5.so

00808000-00809000 rw-p 00012000 fd:00 47744065 /lib/libnsl-2.3.5.so

00809000-0080b000 rw-p 00809000 00:00 0

00819000-00911000 r-xp 00000000 fd:00 47744062 =
/lib/libcrypto.so.0.9.7f

00911000-00923000 rw-p 000f8000 fd:00 47744062 =
/lib/libcrypto.so.0.9.7f

00923000-00926000 rw-p 00923000 00:00 0

00928000-0093f000 r-xp 00000000 fd:00 46013969 =
/usr/lib/libgssapi_krb5.so.2.2

0093f000-00940000 rw-p 00017000 fd:00 46013969 =
/usr/lib/libgssapi_krb5.so.2.2

00942000-00977000 r-xp 00000000 fd:00 47744063 /lib/libssl.so.0.9.7f

00977000-0097a000 rw-p 00035000 fd:00 47744063 /lib/libssl.so.0.9.7f

00a52000-00a53000 r-xp 00a52000 00:00 0

00b08000-00b7e000 r-xp 00000000 fd:00 46007448 =
/usr/lib/libmysqlpp.so.2.0.7

00b7e000-00c75000 rw-p 00076000 fd:00 46007448 =
/usr/lib/libmysqlpp.so.2.0.7

00e03000-00e0c000 r-xp 00000000 fd:00 47743117 =
/lib/libgcc_s-4.0.2-20051126.so.1

00e0c000-00e0d000 rw-p 00009000 fd:00 47743117 =
/lib/libgcc_s-4.0.2-20051126.so.1

08048000-08053000 r-xp 00000000 fd:00 47120608 =
/usr/src/mysql++/examples/simple1

08053000-08054000 rw-p 0000a000 fd:00 47120608 =
/usr/src/mysql++/examples/simple1

08933000-08954000 rw-p 08933000 00:00 0 [heap]

b7e00000-b7e21000 rw-p b7e00000 00:00 0

b7e21000-b7f00000 ---p b7e21000 00:00 0

b7f14000-b7f19000 rw-p b7f14000 00:00 0

b7f20000-b7f22000 rw-p b7f20000 00:00 0

bff0d000-bff21000 rwxp bff0d000 00:00 0 [stack]

bff21000-bff22000 rw-p bff21000 00:00 0

Aborted

[root@localhost examples]#


------_=_NextPart_001_01C61618.6818E148--

Reply With Quote
  #2  
Old   
Verfranc Raganas
 
Posts: n/a

Default Re: free(): invalid pointer - 01-16-2006 , 07:09 AM






I have solved this problem by compiling
http://tangentsoft.net/mysql++/relea...+-2.0.7.tar.gz in Fedora
Core 4. I did not use rpmbuild, just the ./configure then make.


On 1/11/06, alan.alvarez (AT) us (DOT) army.mil <alan.alvarez (AT) us (DOT) army.mil> wrote:
Quote:
Fedora Core 4 has serious issues with dlls. I've had various already one =
of them being with mysql++ and was discussed on this list. I'd recommend in=
stalling another system.
Quote:
Respectfully,
Alan Alvarez.

----- Original Message -----
From: Verfranc Raganas <verfranc (AT) gmail (DOT) com
Date: Wednesday, January 11, 2006 3:13 pm
Subject: free(): invalid pointer

Hi,

I'm using Fedora Core 4 with MySQL 4.1.16. I compiled and run resetdb
successfully.

It created the sample database. Then I compiled simple1.cpp, but when
I run it, it dumps this:

[root@localhost examples]# ./simple1

Item Num Weight Price Date

N=FCrnberger Brats 92 1.5 8.79 2005-03-10

Pickle Relish 87 1.5 1.75 1998-09-04

Hot Mustard 75 0.95 0.97 1998-05-25

Hotdog Buns 65 1.1 1.1 1998-04-23

*** glibc detected *** ./simple1: free(): invalid pointer:
0x08947ab0 ***

=3D=3D=3D=3D=3D=3D=3D Backtrace: =3D=3D=3D=3D=3D=3D=3D=3D=3D

/lib/libc.so.6[0x2df124]

/lib/libc.so.6(__libc_free+0x77)[0x2df65f]

/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0x2470a9]

/usr/lib/libmysqlpp.so.2(_ZN7mysqlpp3RowD1Ev+0x34d)[0xb404fd]

./simple1[0x804b6cf]

/lib/libc.so.6(__libc_start_main+0xdf)[0x290d5f]

./simple1(__gxx_personality_v0+0x91)[0x804afe5]

=3D=3D=3D=3D=3D=3D=3D Memory map: =3D=3D=3D=3D=3D=3D=3D=3D

00111000-00113000 r-xp 00000000 fd:00 47743104 /lib/libdl-2.3.5.so

00113000-00114000 r--p 00001000 fd:00 47743104 /lib/libdl-2.3.5.so

00114000-00115000 rw-p 00002000 fd:00 47743104 /lib/libdl-2.3.5.so

00115000-0011e000 r-xp 00000000 fd:00 47743028 /lib/libnss_files-
2.3.5.so
0011e000-0011f000 r--p 00008000 fd:00 47743028 /lib/libnss_files-
2.3.5.so
0011f000-00120000 rw-p 00009000 fd:00 47743028 /lib/libnss_files-
2.3.5.so
001a0000-00272000 r-xp 00000000 fd:00 46010035
/usr/lib/libstdc++.so.6.0.7
00272000-00277000 rw-p 000d2000 fd:00 46010035
/usr/lib/libstdc++.so.6.0.7
00277000-0027c000 rw-p 00277000 00:00 0

0027c000-0039f000 r-xp 00000000 fd:00 47743070 /lib/libc-2.3.5.so

0039f000-003a1000 r--p 00123000 fd:00 47743070 /lib/libc-2.3.5.so

003a1000-003a3000 rw-p 00125000 fd:00 47743070 /lib/libc-2.3.5.so

003a3000-003a5000 rw-p 003a3000 00:00 0

0047a000-00494000 r-xp 00000000 fd:00 47743026 /lib/ld-2.3.5.so

00494000-00495000 r--p 00019000 fd:00 47743026 /lib/ld-2.3.5.so

00495000-00496000 rw-p 0001a000 fd:00 47743026 /lib/ld-2.3.5.so

004a6000-004eb000 r-xp 00000000 fd:00 47054887
/usr/lib/mysql/libmysqlclient.so.14.0.0

004eb000-005c5000 rw-p 00045000 fd:00 47054887
/usr/lib/mysql/libmysqlclient.so.14.0.0

005c5000-005c8000 rw-p 005c5000 00:00 0

005c9000-005ec000 r-xp 00000000 fd:00 47744059 /lib/libm-2.3.5.so

005ec000-005ed000 r--p 00022000 fd:00 47744059 /lib/libm-2.3.5.so

005ed000-005ee000 rw-p 00023000 fd:00 47744059 /lib/libm-2.3.5.so

005f0000-00602000 r-xp 00000000 fd:00 46010512
/usr/lib/libz.so.1.2.2.2
00602000-00603000 rw-p 00011000 fd:00 46010512
/usr/lib/libz.so.1.2.2.2
00619000-00628000 r-xp 00000000 fd:00 47743007 /lib/libresolv-
2.3.5.so
00628000-00629000 r--p 0000e000 fd:00 47743007 /lib/libresolv-
2.3.5.so
00629000-0062a000 rw-p 0000f000 fd:00 47743007 /lib/libresolv-
2.3.5.so
0062a000-0062c000 rw-p 0062a000 00:00 0

00641000-00646000 r-xp 00000000 fd:00 47744064 /lib/libcrypt-
2.3.5.so
00646000-00647000 r--p 00004000 fd:00 47744064 /lib/libcrypt-
2.3.5.so
00647000-00648000 rw-p 00005000 fd:00 47744064 /lib/libcrypt-
2.3.5.so
00648000-0066f000 rw-p 00648000 00:00 0

00671000-00673000 r-xp 00000000 fd:00 47744061
/lib/libcom_err.so.2.1
00673000-00674000 rw-p 00001000 fd:00 47744061
/lib/libcom_err.so.2.1
00756000-007c5000 r-xp 00000000 fd:00 46013966
/usr/lib/libkrb5.so.3.2
007c5000-007c8000 rw-p 0006e000 fd:00 46013966
/usr/lib/libkrb5.so.3.2
007ca000-007ed000 r-xp 00000000 fd:00 46013964
/usr/lib/libk5crypto.so.3.0
007ed000-007ee000 rw-p 00023000 fd:00 46013964
/usr/lib/libk5crypto.so.3.0
007f0000-007f2000 r-xp 00000000 fd:00 46013792
/usr/lib/libkrb5support.so.0.0
007f2000-007f3000 rw-p 00001000 fd:00 46013792
/usr/lib/libkrb5support.so.0.0
007f5000-00807000 r-xp 00000000 fd:00 47744065 /lib/libnsl-2.3.5.so

00807000-00808000 r--p 00011000 fd:00 47744065 /lib/libnsl-2.3.5.so

00808000-00809000 rw-p 00012000 fd:00 47744065 /lib/libnsl-2.3.5.so

00809000-0080b000 rw-p 00809000 00:00 0

00819000-00911000 r-xp 00000000 fd:00 47744062
/lib/libcrypto.so.0.9.7f
00911000-00923000 rw-p 000f8000 fd:00 47744062
/lib/libcrypto.so.0.9.7f
00923000-00926000 rw-p 00923000 00:00 0

00928000-0093f000 r-xp 00000000 fd:00 46013969
/usr/lib/libgssapi_krb5.so.2.2
0093f000-00940000 rw-p 00017000 fd:00 46013969
/usr/lib/libgssapi_krb5.so.2.2
00942000-00977000 r-xp 00000000 fd:00 47744063 /lib/libssl.so.0.9.7f

00977000-0097a000 rw-p 00035000 fd:00 47744063 /lib/libssl.so.0.9.7f

00a52000-00a53000 r-xp 00a52000 00:00 0

00b08000-00b7e000 r-xp 00000000 fd:00 46007448
/usr/lib/libmysqlpp.so.2.0.7
00b7e000-00c75000 rw-p 00076000 fd:00 46007448
/usr/lib/libmysqlpp.so.2.0.7
00e03000-00e0c000 r-xp 00000000 fd:00 47743117
/lib/libgcc_s-4.0.2-20051126.so.1

00e0c000-00e0d000 rw-p 00009000 fd:00 47743117
/lib/libgcc_s-4.0.2-20051126.so.1

08048000-08053000 r-xp 00000000 fd:00 47120608
/usr/src/mysql++/examples/simple1

08053000-08054000 rw-p 0000a000 fd:00 47120608
/usr/src/mysql++/examples/simple1

08933000-08954000 rw-p 08933000 00:00 0 [heap]

b7e00000-b7e21000 rw-p b7e00000 00:00 0

b7e21000-b7f00000 ---p b7e21000 00:00 0

b7f14000-b7f19000 rw-p b7f14000 00:00 0

b7f20000-b7f22000 rw-p b7f20000 00:00 0

bff0d000-bff21000 rwxp bff0d000 00:00 0 [stack]

bff21000-bff22000 rw-p bff21000 00:00 0

Aborted

[root@localhost examples]#

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsu...(DOT) army.mil

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
Warren Young
 
Posts: n/a

Default Re: free(): invalid pointer - 01-16-2006 , 08:34 AM



Verfranc Raganas wrote:
Quote:
I have solved this problem by compiling
http://tangentsoft.net/mysql++/relea...+-2.0.7.tar.gz in Fedora
Core 4.
What were you doing before?

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #4  
Old   
Verfranc Raganas
 
Posts: n/a

Default Re: free(): invalid pointer - 01-16-2006 , 10:40 AM



I'm using Fedora Core 4 with MySQL 4.1.16. I used the mysql++ 2 rpm
suggested/implied in the online mysql++ document. I compiled and run
resetdb
successfully. It created the sample database. Then I compiled
simple1.cpp, but when I run it, it dumps this:

[root@localhost examples]# ./simple1

Item Num Weight Price Date

N=FCrnberger Brats 92 1.5 8.79 2005-03-10

Pickle Relish 87 1.5 1.75 1998-09-04

Hot Mustard 75 0.95 0.97 1998-05-25

Hotdog Buns 65 1.1 1.1 1998-04-23

*** glibc detected *** ./simple1: free(): invalid pointer: 0x08947ab0 ***

So i used the mysql++ source and recompiled it in Fedora Core 4 with
GCC 4. Then I no longer have the invalid pointer error. Maybe the
rpm was built using GCC 3+ and will have issues under GCC 4.



On 1/16/06, Warren Young <mysqlpp (AT) etr-usa (DOT) com> wrote:
Quote:
Verfranc Raganas wrote:
I have solved this problem by compiling
http://tangentsoft.net/mysql++/relea...+-2.0.7.tar.gz in Fedora
Core 4.

What were you doing before?

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsub=3Dverfranc@gmail=
..com


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.