unitest_chseg can run now. valgrind checked: 0 leaks.