Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Patch Available
Description
If a function has negative (implicit) id fields in both its argument list and exception list, like
i32 ret_neg(i32 arg1, i32 arg2) throws (MixedEx1 ex1, MixedEx2 ex2);
then the same counter is used to assign field ids to both the arguments and exceptions. This is bad because the addition of a new argument will renumber the exceptions, breaking wire compatibility. The soon-to-be-uploaded patch fixes this be resetting the counter at the start of any field list. This will break wire-compatibility one time (and only with functions that have both negative-id arguments and negative id-exceptions, and only in the exceptional case), but will prevent future sudden breakages, so I think it is worth it.