2
我的應用程序正在接收分段故障。回溯追蹤日誌 -回溯日誌中的堆棧幀NULL
Program received signal SIGSEV, Segmentation fault.
0x00000000004a5c03 in engine_unlocked_finish()
(gdb) bt
#0 0x00000000004a5c03 in engine_unlocked_finish()
#1 0x00000000004a5d71 in ENGINE_finish()
#2 0x000000000046a537 in EVP_PKEY_free_it()
#3 0x000000000046a91b in EVP_PKEY_free()
#4 0x00000000004b231a in pubkey_cb()
#5 0x0000000000470c97 in asn1_item_combine_free()
#6 0x0000000000750f70 in X509_CINF_seq_tt()
#7 0x00000000010f7d90 in ??()
#8 0x00000000010f7cf0 in ??()
#9 0x0000000000000000 in ??()
將StackFrame在#9
很有趣。它的地址是0x0000000000000000
。這是否意味着在獲得engine_unlocked_finish()
之前堆棧已經損壞?
是的,你已經損壞了你的堆棧框架。至少用'gcc -Wall -g'編譯,也許用'-fsanitize = address'編譯;也可以使用[valgrind](http://valgrind.org/) – 2014-10-06 11:12:27
'-fstack-protector-all'也可能有幫助。 – Tomo 2014-10-06 11:42:46