Tool for static analysis of C++ exception propagation

B

Brendon Costa

Hi all,

A small while ago I released a tool called EDoc++ that can be used to
perform static analysis of C++ exception propagation. I have had
little feedback from the community so far and thought here is a good
place to advertise and possibly ask for feedback. I developed this
tool because I could not find any other tools that perform a similar
task. Using this EDoc++ it is possible to find out exactly what
exceptions a function may throw and to generate documentation that can
be used by doxygen.


The website for EDoc++ can be found at: http://edoc.sourceforge.net/

If you are interested in trying out EDoc++ I would find it really
helpful to know what sort of experiences you have with it and if
possible how it could be improved. There are currently a few known
issues, which should listed on the TODO page: http://edoc.sourceforge.net/todo.html


In order to get an idea of how to use this tool I would recommend
looking at chapter 6 of the user manual titled: Basic Usage

http://edoc.sourceforge.net/EDocManual/ch06.html


Currently it is only supported on POSIX systems that also support
compiling GCC without additional patches applied. You can download it
from:

Source:
http://downloads.sourceforge.net/edoc/edoc-0.1.0.tar.bz2?use_mirror=optusnet

Debian binary package:
http://downloads.sourceforge.net/edoc/edoc_0.1.0-1_i386.deb?use_mirror=optusnet

Cygwin binary package:
http://downloads.sourceforge.net/edoc/edoc-0.1.0-1.tar.bz2?use_mirror=optusnet


If you are building it from source there is a section in the user
manual that describes what dependencies required. If you come across
any problems feel free to ask questions on the mailing list:

http://edoc.sourceforge.net/lists.html

For NetBSD users, there should exist a package in pkgsrc_wip called
edoc that you can use to build and install it.


I have included below an excerpt from the EDoc++ user manual that
describes what this tool achieves.

Finally, thank you in advance for any feedback. This tool is still in
alpha stage development, but should be usable in its current state.
Any feedback I could get will be really helpful.

Thanks,
Brendon.


----- Excerpt from EDoc++ user manual -----
EDoc++ is a tool for C/C++ developers that automates many exception
safety analysis checks and provides detailed documentation about
exception propagation through the code.

Generally a developer will use EDoc++ on a number of C/C++ source
files. For every function implementation encountered in those source
files, EDoc++ will generate a list of exceptions that may be thrown as
a result of calling that function. This list is a "more than complete"
list of propagating exceptions.

After generating this list of possible exceptions, EDoc++ will then
perform certain exception safety checks on the code, attempting to
determine usages of exceptions which may cause the program to crash.
This includes erroneous usages like:

* Exceptions propagating through code compiled with -fno-exceptions
* Exceptions propagating out functions not permitted by the functions
throw() specifier
* Exceptions propagating out the main() function
* Exceptions propagating out of static initialisation code
 

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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top