Topic: when i execute some functions in sgx? it report error,why?
I exeuted the function such as : wolfSSL_X509_notBefore、wolfSSL_X509_notAfter、wolfSSL_X509_get_signature,it reported " Segmentation fault " why ?
You are not logged in. Please login or register.
Please post questions or comments you have about wolfSSL products here. It is helpful to be as descriptive as possible when asking your questions.
ReferenceswolfSSL - Embedded SSL Library → wolfSSL → when i execute some functions in sgx? it report error,why?
I exeuted the function such as : wolfSSL_X509_notBefore、wolfSSL_X509_notAfter、wolfSSL_X509_get_signature,it reported " Segmentation fault " why ?
zhq0918,
Seg faults most commonly occur when the library was compiled with one configuration but the application using the library has a different configuration. Yesterday I had recommended you add a setting to the Linux SGX makefile, please add the same define to the wolfssl-examples/SGX_Linux/sgx_t.mk and sgx_u.mk to ensure the application is configured the same as the library.
Warm Regards,
K
Hi @Kaleb, thank you for your answer.I have added the "-DKEEP_PEER_CERT -DSESSION_CERTS -DOPENSSL_ALL" to the Wolfssl_C_Extra_Flags in sgx_t.mk and when i make the lib which named libwolfssl.sgx.static.lib.a, but the same error which name Segmentation fault reported again.
Regards
zhq0918
Hi @zhq0918,
If the seg fault is not due to misconfiguration the next thing to check is dereferencing a NULL variable in any way IE let's say a malloc failed and a variable wasn't checked against NULL after the malloc but application code later uses the variable which was never allocated.
If that proves not to be the case check for variable use after a free IE a variable was malloced, used, freed, used again (after the free).
A third thing to check is reading out of bounds IE is there any application code that accesses or modifies memory outside of a variable (buffer overflow/underflow).
Last thing to check is your stack and heap inside the enclave. If the stack and heap are colliding one could be over-writing the other causing corruptions in either stack or heap which can result in a segmentation fault.
Regards,
K
Ok,thank you @Kaleb , I have tried again as you said.The problem has been resolved.
Regards
zhq0918
wolfSSL - Embedded SSL Library → wolfSSL → when i execute some functions in sgx? it report error,why?
Powered by PunBB, supported by Informer Technologies, Inc.
Generated in 0.017 seconds (87% PHP - 13% DB) with 12 queries