Software anti-bugs

M

M.Caggiano

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!
 
J

James Kuyper

M.Caggiano said:
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

M.Caggiano

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?
 
T

Tomás Ó hÉilidhe

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.
 
J

jameskuyper

M.Caggiano said:
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.
 
U

user923005

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 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).
 
G

Guest

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
 
T

Tomás Ó hÉilidhe

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;
}
 
C

Chris McDonald

=?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= said:
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?
 
A

Andrew Smallshaw

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.
 
K

Keith Thompson

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

Or unspecified.
 
A

Andrew Smallshaw

If a program functions as intended on every conceivable
implementation of the C programming language,
then it contains no undefined behavior.

I'm not sure even that's true. After all, every conceivable
_practical_ implementation will deviate from the standard somewhere
or other (bugs and all). Since there's no saying exactly where
the bugs may be, according this definition portable code is a sheer
impossibility.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top