Talkback for article: 371, March2005

Optimizing C/C++ programs using the GProf profiler

Back to: http://cgi.linuxfocus.org/English/March2005/article371.shtml

From: Winny Thomas <winny.thomas(at)nevisnetworks.com> [ date: 2005-04-12 ]
Hi,
I came across your article today. Your article is interesting and was useful for me. I work in an audit team and do a lot of code reading to find holes. I came up with a tool to make my work easy. As of now the tool (i call it codescanner) scans C source files and finds out the following for me and prints out the corresponding line number in the source code.

1. calls to allocation routines without checks on return value
2. presence of formatting functions like printf without the format specifier
3. presence of uninitialized variables and their use on the right hand side of an assignment

Well my tool works fine, except that its very slow when it has to look at a directory. I use a linked list to store file information. Your article mentioned that linked lists are not a very useful data structure for heavy weight work, especially searching. so that was a useful tip for me. also running my tool with profiling gave me a good picture of where my code spends most of the time.
Thank you very much for a good article.

Regards,
Winny
From: ghazal hassanzadeh <nika20082002(at)yahoo.com> [ date: 2005-06-07 ]
not bad
From: gxguo <gxguo(at)pub.ss.pku.edu.cn> [ date: 2006-01-15 ]
good , very good . it's help for me to solve the problem , thank you

3 talkbacks




Due to the increased amount of web spam we have deciced to removed the talkback posting possibility. You can read old talkbacks but you can no longer post new ones.

Back to http://cgi.linuxfocus.org/English/March2005/article371.shtml

Please contact webmaster(at)linuxfocus.org if you have any questions with regards to this talkback

lftalkback version 3.10