valgrind --tool=memcheck --leak-check=full --show-reachable=yes ./test catchsegv ./test 或者-g 编译 , 用gdb test 然后run