-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Idol calls returning a `Complex` error type return a non-zero error code of `1`, but _also_ serialize their error into the buffer provided by the caller. Right now, we're not necessarily sizing that buffer correctly when making HIF and RPC calls! If the `ok` type is smaller than the `error` type, then the buffer will be undersized and bytes will be dropped on the floor during the `sys_reply` call. `sys_reply` does not report errors, but it expects the server to check the buffer size itself. A separate issue in Idol (idolatry#36) means that the generated server code makes the same mistake in checking the buffer size; otherwise, we would have seen this error much sooner! (Luckily, this all works correctly in task-to-task calls, because Idol's generated client API correctly computes the maximum `REPLY_SIZE` and passes correctly-sized buffers) This PR correctly computes the `reply_size()` for Idol operations using `Complex` error types. It also fixes an error in computing serialized size for `enum` types (we were taking the sum of variant sizes instead of the max, which is wrong).
- Loading branch information
Showing
9 changed files
with
38 additions
and
35 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters