ged-lab/khmer — pull request #585 by Echelon9 (2014-08-28 15:32:06+00:00)
Title: Fix table.get("wrong_length_string") gives core dump

A number of ```table.get("wrong_length_string")``` functions when called from Python would lead to an unhandled C++ exception, and a subsequent termination (Issue #174).

Note: These reported paths to trigger the core dump included ```table = khmer.new_hashbits(...)```, ```table = khmer.new_hashtable(...)```, and ```table = khmer.new_counting_hash(...)```

Test Driven Development techniques were adopted in resolving this issue. Failing unit tests were written first based upon the user report, and then proposed patches committed until all the tests passed.

This methodology assisted in finding a second location in ```khmer\_khmermodule.cc``` that required the same fix. This was not immediately apparent upon first review of the C++ code.

Testing the reproduction steps with gdb debugger and valgrind confirm the core dump is mitigated.

- [X] Is it mergable?
- [X] Did it pass the tests?
- [X] If it introduces new functionality in scripts/ is it tested?
Check for code coverage.
- [X] Is it well formatted? Look at `make pep8`, `make diff_pylint_report`,
`make cppcheck`, and `make doc` output. Use `make autopep8`,
`astyle -A10 --max-code-length=80`, and manual fixing as needed.
- [ ] Is it documented in the Changelog?
- [X] Was spellcheck run on the source code and documentation after
changes were made?