Openenclave: Function IDs and ECALL/OCALL marshalling structs should be generated under _t.c / _u.c

Created on 19 Mar 2020  路  7Comments  路  Source: openenclave/openenclave

Currently, oeedger8er generates Function IDs and ECALL/OCALL marshalling structs under _u.h / _t.h (was under _args.h before #2691). However, these data types are only used by the bridging functions that _t.c / _u.c implements and therefore should not be visible to files that include _u.h / _t.h. As a result, we should consider moving the definition of those data types to _t.c / _u.c.

devtools triaged

All 7 comments

I tried to move marshalling structs into the .c files, but the test/oeedger8r test assumes it has access to all of these structures.

I still think we should do this, but the test dependency makes it less straight forward.

I tried to move marshalling structs into the .c files, but the test/oeedger8r test assumes it has access to all of these structures.

I still think we should do this, but the test dependency makes it less straight forward.

If this is the case, we should also modify the test. Can you provide some examples?

For example in tests/oeedger8r/host/testbasic.cpp:

char ocall_ret_char()
{
    check_return_type<ocall_ret_char_args_t, char>();
    return '?';
}

There are many other cases of this

I agree the test needs to be changed. I just thought it was going to be a quick fix and didn't have time to unravel what I found :smile:

Will this issue be your blocker? If so, I can help 馃槃

No I'm not blocked on it for now :smile: Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

radhikaj picture radhikaj  路  7Comments

eozturk1 picture eozturk1  路  6Comments

jxyang picture jxyang  路  3Comments

jhand2 picture jhand2  路  3Comments

maverick-zhn picture maverick-zhn  路  7Comments