|
|
Rarva.Riendf
Wizard

Group: Members
Posts: 775
Joined: Jul 15, 2010
|
#17 id:60393 Posted Jan 30, 2012, 9:47 am
|
Quote:I'm not sure why you're so hostile and insist on using terminology incorrectly, it's just confusing and will give people incorrect information.
Considering I described how it happens I doubt it, and I call eveything memory related a memory leak anyway. (cause I use it as a water leaking analogy, not pure IT jargon).
The hostility you feel probably comes from me not being a native english speaker. Was just reminding we already have this conversation, and even if you are 'technically' right, no need to argue about it again with me, I do not care.
|
Last edited Jan 30, 2012, 9:48 am by Rarva.Riendf
|
|
|
|
Rarva.Riendf
Wizard

Group: Members
Posts: 775
Joined: Jul 15, 2010
|
#19 id:60396 Posted Jan 30, 2012, 10:00 am
|
I doubt it changes anything to the point I was making. Memory leaks are usually easy to fix once you detect them. Buffers overflow on the other hand....And Darien was using the term memory leak, if it was only memory leak all over the place it would be easy to detect that Valgrind pukes about that (just need to check to have top launched in a term to check).
|
|
|
arholly
Conjurer

Group: Members
Posts: 233
Joined: Feb 26, 2010
|
#20 id:60397 Posted Jan 30, 2012, 10:10 am
|
Alright, as the OP and a newbie coder, what does it mean when you keep saying "my stack is trashed" and the like? I understand (conceptually) what a leak is but it doesn't help me much in trying to track it down.
|
|
|
Rarva.Riendf
Wizard

Group: Members
Posts: 775
Joined: Jul 15, 2010
|
#21 id:60398 Posted Jan 30, 2012, 10:28 am
|
user error...feel free to delete
|
Last edited Jan 30, 2012, 10:32 am by Rarva.Riendf
|
|
Rarva.Riendf
Wizard

Group: Members
Posts: 775
Joined: Jul 15, 2010
|
#22 id:60399 Posted Jan 30, 2012, 10:30 am
|
The problem is most likely not memory leaking (well considering your coding skills and the state the codebase was in when you took over, you probably have them as well, but since it crashes before you run out of of memory it is not a concern yet anyway) but buffer overflow. Read what I wrote, hoping it is clear enough. And that is a lot harder to find. You must look in Valgrind for output like:
Address 0x1BA45050 is 0 bytes after a block of size 40 alloc'd
or
Address 0x3807F7B4 is 0 bytes inside a block of size 177 free'd
Thos messages are the one you need to concentrate on. Start with the older occurence, as everything coming after may only be a result of the first buffer overflow.
The crash in itself has probably no usable information, as it can be very far away from the initial buffer overflow.
etc..
To have all the Valgrind messages in a nice view, use a front end to it. Personnaly I launch Valgrind within Eclipse, so I just have to click on an error to go through it in the code and everything stay in the same developpement environment. YMMV
|
Last edited Jan 30, 2012, 10:31 am by Rarva.Riendf
|
|
arholly
Conjurer

Group: Members
Posts: 233
Joined: Feb 26, 2010
|
#23 id:60423 Posted Jan 30, 2012, 2:40 pm
|
Can you use the Valgrind add on in a windows environment?
|
|
|
|
|
arholly
Conjurer

Group: Members
Posts: 233
Joined: Feb 26, 2010
|
#25 id:60427 Posted Jan 30, 2012, 3:14 pm
|
So what can I do to help track this down?
|
|
|
Rarva.Riendf
Wizard

Group: Members
Posts: 775
Joined: Jul 15, 2010
|
#26 id:60439 Posted Jan 30, 2012, 4:30 pm
|
Have a virtual image of linux where you can run Valgrind. (this is what I do)
And yes it is Linux only, the windows counterpart is Purify. I think there is a free version for non commercial use or something but never looked into it as Valgrind works fine for me)
|
|
|