Note:- This question is very similar to Passing C++ struct to enclave from app in Intel SGX . I am posting it again as the post is almost 1 year old, hoping that there might be some solution. Please delete this if you think this is duplicate.
I am developing an Intel SGX app. I have a class(called SkipList) with a struct(called node) inside it, in my untrusted app . I am trying to pass this struct as a *void**** with **[user_check] attribute into the enclave.
struct node {
size_t key;
T2 value;
vector<size_t> hashlabel;
vector<node*> forward;
};
Once I receive this inside the enclave I cast this into the struct type as below.
SkipList<int,string>::node* head = static_cast<SkipList<int,string>::node*>(Node);
When I start debugging this, I see that the address of "head" after casting is correct ( I checked this address on application side too, both addresses are same) and also the address of the "forward" member is correct. But when I try to see the elements of "forward", I can see only 1 element. Actually there should be more 15 elements.
Can someone please tell me if this is an issue with SGX STL implementation of vectors? Why am I not able to see it as expected ?