Closed anakrish closed 4 years ago
For the case of adding attribute to the edl-annotated struct, it's required to have the count
attribute be defined. Can we also error out the case that count
is missing?
For example, we should error out the following case.
struct DeepCopy
{
size_t size;
[size=size] char *buf;
};
...
void ocall_test([in, out] DeepCopy *dc)
Otherwise, there will be a compilation error:
/home/ssh_office/workspace/oeedger8r-cpp/build/test/null_check/enc/null_check_t.c:1020:38: error: expected expression before ‘;’ token
for (size_t _i_1 = 0; _i_1 < ; _i_1++)`.
For the case of adding attribute to the edl-annotated struct, it's required to have the
count
attribute be defined. Can we also error out the case thatcount
is missing?For example, we should error out the following case.
struct DeepCopy { size_t size; [size=size] char *buf; }; ... void ocall_test([in, out] DeepCopy *dc)
Otherwise, there will be a compilation error:
/home/ssh_office/workspace/oeedger8r-cpp/build/test/null_check/enc/null_check_t.c:1020:38: error: expected expression before ‘;’ token for (size_t _i_1 = 0; _i_1 < ; _i_1++)`.
@mingweishih That looks like a bug as opposed to a missing validation. Let me address that in a separate PR.
@mingweishih I have addressed all PR feedback. Can you take another look?
Note: Added in_function_
and in_struct_.
parser state variables instead of passing flags.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: anakrish, mingweishih
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Add validation for attributes supported by oeedger8r. Lockdown with tests.
Signed-off-by: Anand Krishnamoorthi anakrish@microsoft.com