The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
rerun a script if aborted and exited melanie_pfefer UNIX for Advanced & Expert Users 3 02-21-2008 09:29 AM
Program received signal SIGSEGV, Segmentation fault. napapanbkk High Level Programming 5 06-30-2007 04:56 AM
BEGIN failed--compilation aborted abhijeetkul UNIX for Advanced & Expert Users 1 03-20-2006 11:36 PM
SIGHUP received to pppd jaguar Linux 2 08-05-2004 04:38 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-05-2006
Registered User
 

Join Date: May 2006
Location: Ames, IA
Posts: 9
Stumble this Post!
Program received signal SIGABRT, Aborted.

I ran degugger in C++ and the followings are the message I got:

Program received signal SIGABRT, Aborted.
0x002a57a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) info s
#0 0x002a57a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x002e97f5 in raise () from /lib/tls/libc.so.6
#2 0x002eb199 in abort () from /lib/tls/libc.so.6
#3 0x0031d4ea in __libc_message () from /lib/tls/libc.so.6
#4 0x0032464c in _int_malloc () from /lib/tls/libc.so.6
#5 0x003260b1 in malloc () from /lib/tls/libc.so.6
#6 0x007964c7 in operator new () from /usr/lib/libstdc++.so.6
#7 0x007965d9 in operator new[] () from /usr/lib/libstdc++.so.6
#8 0x0804b0c5 in matvec::Matrix<double>::resize (this=0xbff67710, m=1, n=50, val=@0xbff676f0)
at ../MABLUPEx/matrix.h:286
#9 0x0804bbd9 in main () at gvstatP5.cpp:69


I am not sure where the problem is. I would guess it's from matrix.h, so I attached that part of the program.

template<class T> inline Matrix<T>& Matrix<T>::resize(const size_type m,const size_type n,const T& val)
{
if (m == 0 || n == 0) {
clear();
} else {
int i,j;
if (m != nrow || n != ncol) {
clear();
nrow = m;
ncol = n;
me = new T* [nrow];
assert( me != 0 );
for (i=0; i<nrow; ++i) {
me[i] = new T [ncol]; // line 286
assert( me[i] != 0 );
}
}
for (i=0; i<nrow; ++i) for (j=0; j<ncol; ++j) me[i][j] = val;
}
return *this;
}

Could somebody educate me what the problem is?

Thank you so much.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-06-2006
Registered User
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 923
Stumble this Post!
These memory problems can be hard to pin down. Unless your system is actually running out of memory, quite unlikely, the problem likely occurs earlier, with an invalid free.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0