我有以下问题:
Value of: b Actual: "asdf" Expected: a Which is: "sdf" *** glibc detected *** ./test.o: free(): invalid pointer: 0x00000000022d3e98 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x78a8f)[0x7f56e5f8ea8f] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x73)[0x7f56e5f928e3] ./test.o[0x42242b] ./test.o[0x445a00] ./test.o[0x4407fe]
当我运行此代码时会发生这种情况:
... std::string first("first"),second("second"); ASSERT_STREQ(first.c_str(),second.c_str()); ...
P.S: 我很抱歉有干扰,但这个问题正在汇编中。我重新编译了库并修复了它。