![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
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. |
| Forum Sponsor | ||
|
|
|
|||
|
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.
|
|||
| Google The UNIX and Linux Forums |