g++ _int_free () from /lib/tls/libc.so.6: segmentation fault

K

kalyan.abbaraju

Hi,

Can anybody identify a cause or suggest a solution for this
segmentation fault.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218629504 (LWP 4935)]
0x051b2071 in _int_free () from /lib/tls/libc.so.6
(gdb) bt
#0 0x051b2071 in _int_free () from /lib/tls/libc.so.6
#1 0x051b1018 in free () from /lib/tls/libc.so.6
#2 0x009a91f3 in operator delete () from /usr/lib/libstdc++.so.5
#3 0x001831da in mytest_c::CloseDBInterface (this=0xbffeb6b0) at
mytestmx.cc:1985
#4 0x0017d44c in ~mytest_c (this=0xbffeb6b0) at mytestmx.cc:159
#5 0x080553fa in case001 () at mytestmx.cc:151
#6 0x080556b4 in main () at mytestmx.cc:128

Thanks in advance

Regards
Kalyan
 
T

Torsten Mueller

[Switching to Thread -1218629504 (LWP 4935)]
0x051b2071 in _int_free () from /lib/tls/libc.so.6
(gdb) bt
#0 0x051b2071 in _int_free () from /lib/tls/libc.so.6
#1 0x051b1018 in free () from /lib/tls/libc.so.6
#2 0x009a91f3 in operator delete () from /usr/lib/libstdc++.so.5
#3 0x001831da in mytest_c::CloseDBInterface (this=0xbffeb6b0) at
mytestmx.cc:1985
#4 0x0017d44c in ~mytest_c (this=0xbffeb6b0) at mytestmx.cc:159
#5 0x080553fa in case001 () at mytestmx.cc:151
#6 0x080556b4 in main () at mytestmx.cc:128

Could you plese show the code of your mytest_c::CloseDBInterface
method called by the descructor of mytest_c? Especially the line with
"delete"?

T.M.
 
J

Jacek Dziedzic

Hi,

Can anybody identify a cause or suggest a solution for this
segmentation fault.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218629504 (LWP 4935)]
0x051b2071 in _int_free () from /lib/tls/libc.so.6
(gdb) bt
#0 0x051b2071 in _int_free () from /lib/tls/libc.so.6
#1 0x051b1018 in free () from /lib/tls/libc.so.6
#2 0x009a91f3 in operator delete () from /usr/lib/libstdc++.so.5
#3 0x001831da in mytest_c::CloseDBInterface (this=0xbffeb6b0) at
mytestmx.cc:1985
#4 0x0017d44c in ~mytest_c (this=0xbffeb6b0) at mytestmx.cc:159
#5 0x080553fa in case001 () at mytestmx.cc:151
#6 0x080556b4 in main () at mytestmx.cc:128

90% to "you delete the same memory twice".
5% to "you 'delete' instead of 'delete[]' or the other way round".
5% to other options.

Without seeing the actual code I had to resort to me glass ball,
it may not be accurate!

HTH,
- J.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top