Version
5.6.3
Description
This issue happens while we try to verify a ECC signature and wc_ecc_verify_hash_ex function is invoked. Inside this function, DECLARE_CURVE_SPECS(ECC_CURVE_FIELD_COUNT) is used to make a spec_ints array.
However, in debugging we've found that marco DECLARE_CURVE_SPECS does not work well, spec_ints is NULL. See attached image. This leads to further crashing.
After having some investigation, we see if we replace ECC_CURVE_FIELD_COUNT by a hardcode (i.e. 5 ) or using a define, then it works well.
I suspect if passing an enum value as a parameter to a macro can cause this problem. I tried some experiment to test a same scenario in other source with my compiler, it still works.
C Compiler: Tasking TriCore

Version
5.6.3
Description
This issue happens while we try to verify a ECC signature and
wc_ecc_verify_hash_exfunction is invoked. Inside this function,DECLARE_CURVE_SPECS(ECC_CURVE_FIELD_COUNT)is used to make a spec_ints array.However, in debugging we've found that marco
DECLARE_CURVE_SPECSdoes not work well,spec_intsisNULL. See attached image. This leads to further crashing.After having some investigation, we see if we replace
ECC_CURVE_FIELD_COUNTby a hardcode (i.e. 5 ) or using a define, then it works well.I suspect if passing an
enumvalue as a parameter to a macro can cause this problem. I tried some experiment to test a same scenario in other source with my compiler, it still works.C Compiler: Tasking TriCore