Re: Memory fault when i am using a shared object
- From: Paul Pluzhnikov <ppluzhnikov-nsp@xxxxxxxxxxx>
- Date: Thu, 30 Mar 2006 21:38:49 -0800
"Aneesh E Warrier" <vinuwarrier@xxxxxxxxx> writes:
Have you considered the possibility that there is a bug in your code?
I tried that; if I am not invoking any of the functions from the
library still I am getting the memory fault.
That doesn't mean the code from it isn't invoked: shared libraries
have initializers and finalizers, and in fact your crash comes
from finalizer.
In my application there is only one cout statement and return
statement.
It is printing the comment in cout then it is giving memory fault.
No, it isn't. According to your stack trace, main() has *aready*
returned (and printed whatever it was going to print).
You are now beginning the unload process on the shared library. The
first step -- calling finalizer -- is where the crash happens.
#0 0x00a08b22 in std::_Rb_tree<char*, char*, std::_Identity<char*>,
std::less<char*>, std::allocator<char*> >::_S_right (__x=0x3) at
__x is supposed to be a pointer; 0x3 is certainly a bad value.
#1 0x00a08791 in std::_Rb_tree<char*, char*, std::_Identity<char*>,
std::less<char*>, std::allocator<char*> >::_M_erase (this=0x8abbd20, __x=0x3) at
#2 0x00a0879d in std::_Rb_tree<char*, char*, std::_Identity<char*>,
std::less<char*>, std::allocator<char*> >::_M_erase (this=0x8abbd20, __x=0x8abc768)
The bad value came from the frame #2, which is internal to the _Rb_tree.
This means that the "set" sub-object of the BufMgr object has
been corrupted (likely by a bug in BufMgr constructor, or a
constructor for some other global object).
Run your program under valgrind, and fix any errors it finds.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
.
- References:
- Memory fault when i am using a shared object
- From: Aneesh E Warrier
- Re: Memory fault when i am using a shared object
- From: Paul Pluzhnikov
- Re: Memory fault when i am using a shared object
- From: Aneesh E Warrier
- Memory fault when i am using a shared object
- Prev by Date: Re: Memory fault when i am using a shared object
- Next by Date: /usr/bin/ld cannot locate libmysqlclient, when it is there
- Previous by thread: Re: Memory fault when i am using a shared object
- Next by thread: CK-ERP (Open Source ERP/CRM Software) v.0.18.1 released
- Index(es):
Relevant Pages
|
|