Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Update name section parsing #270

Merged
merged 10 commits into from
Mar 29, 2019
Merged

Update name section parsing #270

merged 10 commits into from
Mar 29, 2019

Conversation

mikevoronov
Copy link
Contributor

Resolves #268

@parity-cla-bot
Copy link

It looks like @michaelvoronov hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement at the following URL: https://cla.parity.io

Once you've signed, please reply to this thread with [clabot:check] to prove it.

Many thanks,

Parity Technologies CLA Bot

@mikevoronov
Copy link
Contributor Author

[clabot:check]

@parity-cla-bot
Copy link

It looks like @michaelvoronov signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

loop {
let subsection_type: u8 = match VarUint7::deserialize(rdr) {
Ok(raw_subsection_type) => raw_subsection_type.into(),
// todo: be more selective detecting no more subsection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach of parsing is very similar to section deserialization (and this cmt comes directly from it:)).

But it seems a little bit unreliable because there could be different types of IO errors, and we are interested only in UnexpectedEof here. I don't dig too much to parity-wasm internals, but in my point of view, the corner case of this problem is here when all IO errors map to Error::HeapOther, so it is impossible in section and subsections parsing to distinguish UnexpectedEof from other errors.

@NikVolf NikVolf merged commit c4149b4 into paritytech:master Mar 29, 2019
@NikVolf
Copy link
Contributor

NikVolf commented Mar 29, 2019

Awesome, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants