Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Software anti-bugs (http://www.velocityreviews.com/forums/t648703-software-anti-bugs.html)

M.Caggiano 12-15-2008 01:06 PM

Software anti-bugs
 
Hi!

I have this question: which are the softwares that allow me to find/
analyze bugs in the open source softwares?? (like Bugzilla...)

Thank's so much!

James Kuyper 12-15-2008 01:21 PM

Re: Software anti-bugs
 
M.Caggiano wrote:
> Hi!
>
> I have this question: which are the softwares that allow me to find/
> analyze bugs in the open source softwares?? (like Bugzilla...)


The Bugzilla that I'm familiar with provides no direct help with finding
or analyzing bugs. What it does is help impose an organized approach to
reporting bugs and responding to those reports.

I used to find PR:QAC <http://www.aimselec.com/qac_frames_c.htm> to be
very helpful, until my company decided that the license was too
expensive to justify the expense.

M.Caggiano 12-15-2008 01:33 PM

Re: Software anti-bugs
 
On 15 Dic, 14:21, James Kuyper <jameskuy...@verizon.net> wrote:
> M.Caggiano wrote:
> > Hi!

>
> > I have this question: which are the softwares that allow me to find/
> > analyze bugs in the open source softwares?? (like Bugzilla...)

>
> The Bugzilla that I'm familiar with provides no direct help with finding
> or analyzing bugs. What it does is help impose an organized approach to
> reporting bugs and responding to those reports.
>
> I used to find PR:QAC <http://www.aimselec.com/qac_frames_c.htm> to be
> very helpful, until my company decided that the license was too
> expensive to justify the expense.


Thank's so much James Kuyper! I immediately will try the software that
you have recommended me. Do you know others of it?

Tomás Ó hÉilidhe 12-15-2008 01:36 PM

Re: Software anti-bugs
 
On Dec 15, 8:06*pm, "M.Caggiano" <Michele.Caggi...@gmail.com> wrote:
> Hi!
>
> I have this question: which are the softwares that allow me to find/
> analyze bugs in the open source softwares?? (like Bugzilla...)
>
> Thank's so much!




I'm quite new to debugging, 90% of what I know about it has been
learned in the last week from Nate Eldredge (thanks by the way Nate).

Bugs manifest themselves in many ways. Here's a few different kinds:
1) Directly observable, e.g. if the window title is "Internet
Exlr;l;;;?;;?" instead of "Internet Explorer".
2) Bugs that result from violations of the C standard, but that don't
violate the machine code rules. An example would be writing off the
end of an array into another array on the same function-call stack,
there's nothing wrong with doing that in machine code but it's a no-no
in C. Such bugs result in the corruption of data (which might lead to
a crash).
3) Bugs that result from violations of both C and machine code, such
as trying to access a region of memory that you just plain aren't
allowed to access. Such errors result in a "segmentation fault" and
your program dies.

To troubleshoot the first bug, look for the piece of code that sets
the window's title, go through it line by line and look for the
mistake.

To troubleshoot the second and third bugs, you can use a thing called
"mudflap" that comes with the GCC compiler. The way mudflap works is
that it will inform you of any dodgy memory accesses. You can choose
to have mudflap kill the program resulting in a "core dump", and then
use a debugger such as GDB to analyse the core dump to see where the
error occurred.

jameskuyper 12-15-2008 03:15 PM

Re: Software anti-bugs
 
M.Caggiano wrote:
> On 15 Dic, 14:21, James Kuyper <jameskuy...@verizon.net> wrote:
> > M.Caggiano wrote:
> > > Hi!

> >
> > > I have this question: which are the softwares that allow me to find/
> > > analyze bugs in the open source softwares?? (like Bugzilla...)

> >
> > The Bugzilla that I'm familiar with provides no direct help with finding
> > or analyzing bugs. What it does is help impose an organized approach to
> > reporting bugs and responding to those reports.
> >
> > I used to find PR:QAC <http://www.aimselec.com/qac_frames_c.htm> to be
> > very helpful, until my company decided that the license was too
> > expensive to justify the expense.

>
> Thank's so much James Kuyper! I immediately will try the software that
> you have recommended me. ...


Sorry - I should have said something about this explicitly - but
following up on that web link I couldn't find any evidence that they
still sell that product, and I couldn't find any other relevant links.
I might not have looked in the right place.

> ... Do you know others of it?


lint is widely available on unix-like systems, and I wouldn't be
surprised to hear of versions that work in other environments.
Warning: the name 'lint' is inspired by the phrase 'lint picking', and
it's a good choice, because 'lint' is very picky. The key thing that
distinguishes an experienced user of 'lint' from a newbie is that the
experienced user knows how to turn off many of the warnings, and knows
which of the remaining warnings should be ignored.

I've heard good things about a program called valgrind, but I've no
personal experience with it.

user923005 12-15-2008 10:53 PM

Re: Software anti-bugs
 
On Dec 15, 5:06*am, "M.Caggiano" <Michele.Caggi...@gmail.com> wrote:
> Hi!
>
> I have this question: which are the softwares that allow me to find/
> analyze bugs in the open source softwares?? (like Bugzilla...)


I am not sure if you want to search for bugs in software like Bugzilla
or if you want to use Bugzilla to solve bugs.
We use Mantis for issue tracking here (same functionality as
Bugzilla).
http://www.mantisbt.org/

For memory problems, Duma is nice:
http://duma.sourceforge.net/

I am rather fond of Lint:
http://www.gimpel.com/

You can get Splint (C only -- no C++) here:
http://www.splint.org/

You will need a revision control system. You might try this one:
http://subversion.tigris.org/

Most debuggers are system specific, but gdb is farily ubiquitous (we
use it on almost all of our POSIX systems).

Most of the other tools I like are quite system specific.

I suspect that news:comp.programming is a better place for your query,
which is about how to manage defects (which has nothing to do with C
other than the fact that C programs may also contain defects like any
other program).

nick_keighley_nospam@hotmail.com 12-16-2008 09:49 AM

Re: Software anti-bugs
 
On 15 Dec, 13:36, Tomás Ó hÉilidhe <t...@lavabit.com> wrote:

> I'm quite new to debugging, 90% of what I know about it has been
> learned in the last week from Nate Eldredge (thanks by the way Nate).
>
> Bugs manifest themselves in many ways. Here's a few different kinds:
> 1) Directly observable, e.g. if the window title is "Internet
> Exlr;l;;;?;;?" instead of "Internet Explorer".
> 2) Bugs that result from violations of the C standard, but that don't
> violate the machine code rules. An example would be writing off the
> end of an array into another array on the same function-call stack,
> there's nothing wrong with doing that in machine code but it's a no-no
> in C. Such bugs result in the corruption of data (which might lead to
> a crash).
> 3) Bugs that result from violations of both C and machine code, such
> as trying to access a region of memory that you just plain aren't
> allowed to access. Such errors result in a "segmentation fault" and
> your program dies.


4) Code that is actually "correct", in that it has no deviations
from the standard, but actually does the wrong thing.

I think most bugs are type 4

Tomás Ó hÉilidhe 12-16-2008 12:20 PM

Re: Software anti-bugs
 
On Dec 16, 4:49*pm, nick_keighley_nos...@hotmail.com wrote:

> 4) Code that is actually "correct", in that it has no deviations
> from the standard, but actually does the wrong thing.
>
> I think most bugs are type 4



By the by, my own personal definition of "fully-portable code" is code
that satisfies the following two criteria:

1) It contains no undefined behaviour.
2) It functions as intended on every conceivable implementation of the
C Standard.

Here's an example of a program that satisfies the first criterion, but
fails the second one:

#include <stdio.h>

int main(void)
{
printf("The number zero is written as %u\n", 65535u + 1);
return 0;
}

Chris McDonald 12-16-2008 07:58 PM

Re: Software anti-bugs
 
=?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= <toe@lavabit.com> writes:

>By the by, my own personal definition of "fully-portable code" is code
>that satisfies the following two criteria:


>1) It contains no undefined behaviour.
>2) It functions as intended on every conceivable implementation of the
>C Standard.


More of a philosophical thought:

if the C Standard is sufficiently well defined, wouldn't your definition
of "fully-portable code" be satisfied if the program functions as intended
on *just one* implementation?

--
Chris.

Andrew Smallshaw 12-16-2008 08:09 PM

Re: Software anti-bugs
 
On 2008-12-16, Chris McDonald <chris@csse.uwa.edu.au> wrote:
>
> More of a philosophical thought:
>
> if the C Standard is sufficiently well defined, wouldn't your definition
> of "fully-portable code" be satisfied if the program functions as intended
> on *just one* implementation?


Not really. The problem lies in the fact that various aspects are
_defined_ as being undefined or implementation-defined.

--
Andrew Smallshaw
andrews@sdf.lonestar.org


All times are GMT. The time now is 04:47 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.