Re: Runtime security/memory checks for gcc/gdb

2010-01-13 Thread guy keren
Amos Shapira wrote: 2010/1/13 guy keren c...@actcom.co.il: if you are running on windows - you can use purify - it's a commercial tool, Why the condition of Windows? Purify is available for Linux as well. --Amos i meant (implied) that if he's using windows, he cannot use valgrind there -

Re: Runtime security/memory checks for gcc/gdb

2010-01-13 Thread Elazar Leibovich
On Wed, Jan 13, 2010 at 10:50 AM, guy keren c...@actcom.co.il wrote: Amos Shapira wrote: 2010/1/13 guy keren c...@actcom.co.il: if you are running on windows - you can use purify - it's a commercial tool, Why the condition of Windows? Purify is available for Linux as well. --Amos i

Re: Runtime security/memory checks for gcc/gdb

2010-01-13 Thread guy keren
i never performed a thorough head-to-head comparison between the two. valgrind has a few limitations - i didn't check if purify can overcome them or not. if it can - it could be a reason to use both of them. i think i did once check a program, that had a bug that valgrind didn't manage to

Re: Runtime security/memory checks for gcc/gdb

2010-01-12 Thread Shachar Shemesh
Elazar Leibovich wrote: IIRC the problem was using a different library, and tracing which problems are yours and which are of the library. See for instance this rant http://www.mega-nerd.com/erikd/Blog/CodeHacking/house_of_cards.html I haven't really got into this, so maybe the suprresion

Re: Runtime security/memory checks for gcc/gdb

2010-01-12 Thread guy keren
if you are running on windows - you can use purify - it's a commercial tool, it costs money, but it is worth every cent. it used to have a 2-weeks free evaluation version - so you could check that it works well with your product before you ask management for money. of-course, if you are

Re: Runtime security/memory checks for gcc/gdb

2010-01-12 Thread guy keren
Elazar Leibovich wrote: On Tue, Jan 12, 2010 at 8:02 AM, Shachar Shemesh shac...@shemesh.biz mailto:shac...@shemesh.biz wrote: Elazar Leibovich wrote: I tried using valgrind in a different project. The main problems I've had with valgrind are speed Yes, that is known.

Runtime security/memory checks for gcc/gdb

2010-01-12 Thread Orna Agmon Ben-Yehuda
2010/1/12 Elazar Leibovich elaz...@gmail.com: On Tue, Jan 12, 2010 at 8:02 AM, Shachar Shemesh shac...@shemesh.biz wrote: Elazar Leibovich wrote: I tried using valgrind in a different project. The main problems I've had with valgrind are speed Yes, that is known. and false positives.

Re: Runtime security/memory checks for gcc/gdb

2010-01-12 Thread Amos Shapira
2010/1/13 guy keren c...@actcom.co.il: if you are running on windows - you can use purify - it's a commercial tool, Why the condition of Windows? Purify is available for Linux as well. --Amos ___ Linux-il mailing list Linux-il@cs.huji.ac.il

Runtime security/memory checks for gcc/gdb

2010-01-11 Thread Elazar Leibovich
We have a big legacy embedded code we need to maintain. Often, we wish to run some functions of the code on the PC with injected input, to test them or to test changes we've done to them without loading the code to the device it should run on. The code is written with C. Obviously, this is not an

Re: Runtime security/memory checks for gcc/gdb

2010-01-11 Thread guy keren
valgrind should be your first tool for the task. use it and fix all the errors it reports. what valgrind does not catch, are: 1. corruptions with global variables. 2. many corruptions on the stack. but it catches a lot of other errors. i use no other tools at work - except for as many of

Re: Runtime security/memory checks for gcc/gdb

2010-01-11 Thread guy keren
valgrind will tell you whenever you are using an un-ninitialized variable. it'll do so using runtime analysis. have you tried using valgrind at all? --guy Elazar Leibovich wrote: Just a remark, as some people asked me about it privately. I'm not interested in static analysis (which gcc

Re: Runtime security/memory checks for gcc/gdb

2010-01-11 Thread Oleg Goldshmidt
Elazar Leibovich elaz...@gmail.com writes: Just a remark, as some people asked me about it privately. I'm not interested in static analysis (which gcc gives for uninitialized variables). But with runtime analysis of where the uninitialized variable have been actually used when the code was

Re: Runtime security/memory checks for gcc/gdb

2010-01-11 Thread Elazar Leibovich
I tried using valgrind in a different project. The main problems I've had with valgrind are speed (which is not a problem here) and false positives. Getting gdb to report that during runtime has its advantages. Anyhow, I was hoping to hear about products/valgrind add-ons etc I do not know. The

Re: Runtime security/memory checks for gcc/gdb

2010-01-11 Thread Shachar Shemesh
Elazar Leibovich wrote: I tried using valgrind in a different project. The main problems I've had with valgrind are speed Yes, that is known. and false positives. That one is new to me. Can you elaborate? Getting gdb to report that during runtime has its advantages. Anyhow, I was hoping to

Re: Runtime security/memory checks for gcc/gdb

2010-01-11 Thread Elazar Leibovich
On Tue, Jan 12, 2010 at 8:02 AM, Shachar Shemesh shac...@shemesh.bizwrote: Elazar Leibovich wrote: I tried using valgrind in a different project. The main problems I've had with valgrind are speed Yes, that is known. and false positives. That one is new to me. Can you elaborate? IIRC

Re: Runtime security/memory checks for gcc/gdb

2010-01-11 Thread Dotan Shavit
You can also try: gcc -fmudflap # On Monday 11 January 2010 23:54:09 Elazar Leibovich wrote: We have a big legacy embedded code we need to maintain. Often, we wish to run some functions of the code on the PC with injected input, to test them or to test changes we've done to them without