Improve offset_front()#785
Conversation
|
Could you first take a look at the new offset functions? I'll apply them later. Thanks. |
ia0
left a comment
There was a problem hiding this comment.
Looks good, I've simplified a bit.
|
After this PR is merged, can we merge |
ia0
left a comment
There was a problem hiding this comment.
Thanks! I've changed the logic to have the information at the right place (essentially func_body should be in Expr).
| side_table, | ||
| 0, | ||
| #[cfg(feature = "toctou")] | ||
| &[], |
| globals: Vec<GlobalType>, | ||
| elems: Vec<RefType>, | ||
| datas: Option<usize>, | ||
| func_body: &'m [u8], |
| // SAFETY: This function is only called after parsing an End instruction. | ||
| target.parser = offset_front(target.parser, -1); | ||
| // This function is only called after parsing an End instruction. | ||
| target.parser = offset_front_check(self.context.func_body, target.parser, -1)?; |
There was a problem hiding this comment.
We don't need a check here, since it's not based on user input.
Yes, I'll create a PR from a fork of this branch in my repo to avoid the PR getting double CI (once for push and once for pull_request). |
Do you mind explaining the differences in more detail? You are ahead of me. Thanks! |
#737 is the PR where I merged the
|
#46