原文链接:https://blog.youkuaiyun.com/tl070602023/article/details/82463838
libprotobuf FATAL google/protobuf/generated_message_util.cc:783] CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
terminate called after throwing an instance of ‘google::protobuf::FatalException’
what(): CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
程序使用protobuf,编译没有问题,运行时一到建立protobuf对象就崩溃,搜索了半天没找到原因,后来偶然看到以前正常使用的makefile文件中后面加了-lpthread,加上就好了。我自己的程序没有用到多线程,怀疑是protobuf3里面用到了。
本文解决了一个关于protobuf在运行时突然崩溃的问题。作者在编译无误的情况下,发现程序在创建protobuf对象时崩溃。通过添加-lpthread链接器选项,问题得以解决,表明protobuf3可能内部使用了多线程。
2925

被折叠的 条评论
为什么被折叠?



