Skip to content
This repository has been archived by the owner on May 11, 2020. It is now read-only.

leb128:add ReadVarUint64 function and fix overflow corner case #176

Merged
merged 3 commits into from
Oct 30, 2019

Conversation

laizy
Copy link
Member

@laizy laizy commented Oct 29, 2019

Close #175

@codecov-io
Copy link

codecov-io commented Oct 29, 2019

Codecov Report

Merging #176 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #176      +/-   ##
==========================================
+ Coverage   69.73%   69.75%   +0.01%     
==========================================
  Files          48       48              
  Lines        5489     5491       +2     
==========================================
+ Hits         3828     3830       +2     
  Misses       1318     1318              
  Partials      343      343
Impacted Files Coverage Δ
wasm/leb128/read.go 93.22% <100%> (+0.23%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7c7ff9...47823e5. Read the comment docs.

Copy link
Contributor

@twitchyliquid64 twitchyliquid64 left a comment

Choose a reason for hiding this comment

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

Awesome, thanks so much for digging into this :)

@@ -217,6 +234,8 @@ func readVarUintRecur(r io.Reader, n uint) (uint64, error) {
}
}

// a less efficent recurrsive version but matches the spec defined in https://webassembly.github.io/spec/core/binary/values.html#integers
Copy link
Contributor

Choose a reason for hiding this comment

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

s/recurrsive/recursive

wasm/leb128/read_test.go Outdated Show resolved Hide resolved
wasm/leb128/read_test.go Outdated Show resolved Hide resolved
@twitchyliquid64 twitchyliquid64 merged commit 171acf9 into go-interpreter:master Oct 30, 2019
@laizy laizy deleted the wagon-master branch October 30, 2019 04:54
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.

Read leb128 fail when trying to read 64 bit of small number
3 participants