Software anti-bugs

Discussion in 'C Programming' started by M.Caggiano, Dec 15, 2008.

  1. M.Caggiano

    M.Caggiano Guest

    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!
     
    M.Caggiano, Dec 15, 2008
    #1
    1. Advertising

  2. M.Caggiano

    James Kuyper Guest

    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.
     
    James Kuyper, Dec 15, 2008
    #2
    1. Advertising

  3. M.Caggiano

    M.Caggiano Guest

    On 15 Dic, 14:21, James Kuyper <> 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?
     
    M.Caggiano, Dec 15, 2008
    #3
  4. On Dec 15, 8:06 pm, "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...)
    >
    > 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.
     
    Tomás Ó hÉilidhe, Dec 15, 2008
    #4
  5. M.Caggiano

    jameskuyper Guest

    M.Caggiano wrote:
    > On 15 Dic, 14:21, James Kuyper <> 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.
     
    jameskuyper, Dec 15, 2008
    #5
  6. M.Caggiano

    user923005 Guest

    On Dec 15, 5:06 am, "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...)


    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).
     
    user923005, Dec 15, 2008
    #6
  7. M.Caggiano

    Guest

    On 15 Dec, 13:36, Tomás Ó hÉilidhe <> 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
     
    , Dec 16, 2008
    #7
  8. On Dec 16, 4:49 pm, 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;
    }
     
    Tomás Ó hÉilidhe, Dec 16, 2008
    #8
  9. =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= <> 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.
     
    Chris McDonald, Dec 16, 2008
    #9
  10. On 2008-12-16, Chris McDonald <> 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
     
    Andrew Smallshaw, Dec 16, 2008
    #10
  11. Andrew Smallshaw <> writes:
    > On 2008-12-16, Chris McDonald <> 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.


    Or unspecified.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Nokia
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
     
    Keith Thompson, Dec 16, 2008
    #11
  12. On 2008-12-16, pete <> wrote:
    >
    > 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.

    --
    Andrew Smallshaw
     
    Andrew Smallshaw, Dec 16, 2008
    #12
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. anon
    Replies:
    2
    Views:
    427
    MadCrazyNewbie
    Apr 6, 2004
  2. Mark Rae
    Replies:
    0
    Views:
    633
    Mark Rae
    Mar 7, 2006
  3. Alan Kennedy
    Replies:
    6
    Views:
    346
    Alan Kennedy
    Sep 1, 2005
  4. Tony Meyer
    Replies:
    2
    Views:
    319
    Mike Meyer
    Sep 2, 2005
  5. Josef 'Jupp' Schugt

    Still use 'ruby-bugs' for Ruby bugs?

    Josef 'Jupp' Schugt, Nov 4, 2004, in forum: Ruby
    Replies:
    2
    Views:
    168
    Tom Copeland
    Nov 4, 2004
Loading...

Share This Page