goatface/crabat — Issue #1: flag checking script
Author: goatface
Created: 2011-11-30 06:40:19+00:00
State: open

The flag implementation is good for a modular feeling and to allow changing runtime options without recompile. But the implementation is rather clunky at present. For instance, if one adds a new histogram, it can be easy to make a mistake and define it under certain flag conditions, but then attempt to fill it under different flag conditions, leading to a segmentation fault with almost no debugging information.

Of course, the real solution here is yet another coding overhaul to make the program more object oriented, since Analyzer.cxx is still largely just one huge imperative inline bloated mess. That would also help a lot of Doxygen commenting as well.

In any case, in the mean time, the least work and simplest solution to help catch errors would be a simple script which calls all possible permutations of runtime flag combinations (with regard to which sort of data to analyze). This script should by default pass the -R and -B flags, and be assumed to operate on a very small data run for speed. Then otherwise it will just combine the -r -d -s -x -p -t flags in all possible manners.

At least this way when we make changes to the histogramming, we can know if we introduced a critical segmentation fault, which may only appear under particular runtime flag configurations.