|
From: Christian P. <tr...@ge...> - 2005-08-08 04:00:18
|
hi, this message sounds pretty usual; in fact, I usually know how to fix those issues as valgrind *usually* tells= me,=20 that this happenED because I accessed some space within an already freed ra= nge; however, here it doesn't. instead, right after this message, it even SEGVAU= LTs: =3D=3D27549=3D=3D Thread 5: =3D=3D27549=3D=3D Invalid read of size 1 =3D=3D27549=3D=3D at 0x15601485A: System::IO::Unix::TPollMgr::TInterest:= :notify(System::IO::Unix::TPollMask) (TPollMgr.cpp:241) =3D=3D27549=3D=3D by 0x156014484: System::IO::Unix::TPollMgr::process(Sy= stem::IO::Unix::TPollMgr::TInterest&, System::IO::Unix::TPollMask) (TPollMg= r.cpp:219) =3D=3D27549=3D=3D by 0x1560143CC: System::IO::Unix::TPollMgr::processPen= ding() (TPollMgr.cpp:203) =3D=3D27549=3D=3D by 0x156014033: System::IO::Unix::TPollMgr::dispatchOn= ce(System::TTimeSpan) (TPollMgr.cpp:162) =3D=3D27549=3D=3D by 0x156013610: System::IO::Unix::TPollMgr::threadRun(= System::TVarData) (TPollMgr.cpp:64) =3D=3D27549=3D=3D by 0x156018124: System::TMemFunHandler<System::TFuncto= r<void, System::TTypeList<System::TVarData, System::NullType> >, System::IO= ::Unix::TPollMgr*, void (System::IO::Unix::TPollMgr::*)(System::TVarData)>:= :operator()(System::TVarData) (TFunctor.h:300) =3D=3D27549=3D=3D by 0x155F2881B: System::TFunctor<void, System::TTypeLi= st<System::TVarData, System::NullType> >::operator()(System::TVarData) cons= t (TFunctor.cc:38) =3D=3D27549=3D=3D by 0x155F482C6: startSimpleThread (TThread.cpp:337) =3D=3D27549=3D=3D by 0x157A2F119: start_thread (in /lib/libpthread-2.3.5= =2Eso) =3D=3D27549=3D=3D by 0x1588093E1: clone (in /lib/libc-2.3.5.so) =3D=3D27549=3D=3D Address 0x3C is not stack'd, malloc'd or (recently) free= 'd =3D=3D27549=3D=3D =3D=3D27549=3D=3D Process terminating with default action of signal 11 (SIG= SEGV): dumping core =3D=3D27549=3D=3D Access not within mapped region at address 0x3C =3D=3D27549=3D=3D at 0x15601485A: System::IO::Unix::TPollMgr::TInterest:= :notify(System::IO::Unix::TPollMask) (TPollMgr.cpp:241) =3D=3D27549=3D=3D by 0x156014484: System::IO::Unix::TPollMgr::process(Sy= stem::IO::Unix::TPollMgr::TInterest&, System::IO::Unix::TPollMask) (TPollMg= r.cpp:219) =3D=3D27549=3D=3D by 0x1560143CC: System::IO::Unix::TPollMgr::processPen= ding() (TPollMgr.cpp:203) =3D=3D27549=3D=3D by 0x156014033: System::IO::Unix::TPollMgr::dispatchOn= ce(System::TTimeSpan) (TPollMgr.cpp:162) =3D=3D27549=3D=3D by 0x156013610: System::IO::Unix::TPollMgr::threadRun(= System::TVarData) (TPollMgr.cpp:64) =3D=3D27549=3D=3D by 0x156018124: System::TMemFunHandler<System::TFuncto= r<void, System::TTypeList<System::TVarData, System::NullType> >, System::IO= ::Unix::TPollMgr*, void (System::IO::Unix::TPollMgr::*)(System::TVarData)>:= :operator()(System::TVarData) (TFunctor.h:300) =3D=3D27549=3D=3D by 0x155F2881B: System::TFunctor<void, System::TTypeLi= st<System::TVarData, System::NullType> >::operator()(System::TVarData) cons= t (TFunctor.cc:38) =3D=3D27549=3D=3D by 0x155F482C6: startSimpleThread (TThread.cpp:337) =3D=3D27549=3D=3D by 0x157A2F119: start_thread (in /lib/libpthread-2.3.5= =2Eso) =3D=3D27549=3D=3D by 0x1588093E1: clone (in /lib/libc-2.3.5.so) having a look at that line 241 that caused the "invalid read of size 1", I = see my code like this: if (foo) okay, foo is the problem, but still... why is foo my problem here? is this = space=20 already freed as well? but if so, why didn't valgrind tell me? Thanks in advance, Christian Parpart. =2D-=20 05:54:01 up 137 days, 19:01, 0 users, load average: 2.28, 2.14, 2.15 |
|
From: Paul P. <ppl...@gm...> - 2005-08-08 04:12:46
|
On 8/7/05, Christian Parpart <tr...@ge...> wrote: ... > having a look at that line 241 that caused the "invalid read of size 1", = I see my > code like this: >=20 > if (foo) Most likely 'foo' is an instance variable and 'this' is NULL. If not, you'll need to establish a bit more context. > okay, foo is the problem, but still... why is foo my problem here? is thi= s space > already freed as well? but if so, why didn't valgrind tell me? The space was not free()d. It was never allocated or valid (not on stack, not in heap, nowehere at all). Cheers, |
|
From: Christian P. <tr...@ge...> - 2005-08-08 05:44:00
|
On Monday 08 August 2005 06:12, Paul Pluzhnikov wrote: > On 8/7/05, Christian Parpart <tr...@ge...> wrote: > ... > > > having a look at that line 241 that caused the "invalid read of size 1", > > I see my code like this: > > > > if (foo) > > Most likely 'foo' is an instance variable and 'this' is NULL. > If not, you'll need to establish a bit more context. heh, yeah, it *is* an instance variable; but wether 'this' is NULL or not m= ay=20 remain hidden :( Thanks, Christian Parpart. =2D-=20 07:42:37 up 137 days, 20:50, 0 users, load average: 3.12, 2.56, 2.14 |
|
From: Sebastian K. <Seb...@so...> - 2005-08-08 14:13:07
|
Christian Parpart wrote: > On Monday 08 August 2005 06:12, Paul Pluzhnikov wrote: > >>On 8/7/05, Christian Parpart <tr...@ge...> wrote: >>... >> >> >>>having a look at that line 241 that caused the "invalid read of size 1", >>>I see my code like this: >>> >>>if (foo) >> >>Most likely 'foo' is an instance variable and 'this' is NULL. >>If not, you'll need to establish a bit more context. > > > heh, yeah, it *is* an instance variable; but wether 'this' is NULL or not may > remain hidden :( Just add cerr << "this == " << (void*)this << endl; just before that 241 line, and you'll know. But since 0x3c means only 60 bytes above zero, I'd guess this is NULL. rgds -- Sebastian Kaliszewski |