Boost logo

Boost :

Subject: [boost] [stacktrace] Review
From: Peter Dimov (lists_at_[hidden])
Date: 2017-03-21 20:00:30


I think that the Stacktrace library should be ACCEPTED.

The design is good.

It's unfortunate that to get a stacktrace class that stores the capture
internally in a fixed-size array, as the first iteration did, one has to
write a special allocator, more so because such an allocator isn't readily
available (we don't have one in Boost, for instance). This could easily be
addressed by templating basic_stacktrace on a container (default
std::vector<frame>) instead, which would allow
boost::container::static_vector to be used.

The implementation is good.

The main problem here, as already discussed in detail, is that under Windows
clients of the library that don't make use of the facilities that require
windows.h and COM headers to be included still suffer the penalty of this
inclusion. Fixing this will be a significant increase in usability.

The documentation is adequate, although it could use some editing by a
native speaker.

The library is potentially very useful. Assert handlers, exceptions and
termination handlers can (and should) all make use of it. Wide use under
Windows is however hampered by the limitation described above.

I tested the library under Windows with msvc-14.0, 14.1, Cygwin g++/clang++.
Under Cygwin there is no libbacktrace, but defining
BOOST_STACKTRACE_USE_ADDR2LINE worked.

I invested a fair chunk of time into my evaluation of the library, and am
reasonably knowledgeable about the problem domain.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk