(1) libc::free in TEE is designed to fail. it's because p points to untrusted 
memory and enclave's memory allocator cannot do anything on external heap.

(2) could you please paste your EDl definition of ocall_free as well as its 
implementation? since your passing a pointer, EDL requires you to demonstrate 
the direction and conduct memcpy according to the definition. in this case, the 
pointer is a [in] argument of ocall_free, but no need of memory copy. so the 
most simple solution is to pass the argument in immediate value like uint64_t 
and avoid from "pointer semantics" caused memcpy.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave-sgx-sdk/issues/251#issuecomment-647832391

Reply via email to