fixe traits_test.cpp to not write to unallocated memory