Comments (3)
Hi @Mrs4s, thanks for sending this in. I'll take a look!
from asm.
Lines 145 to 147 in 86603cd
Hi @kalamay , I think this unsafe usage is not correct, because string header has only 2 field but slice header has 3 field.
I have a program using this lib and it panics in std library
encoding/json
randomly on a computer without avx2 feature.with panic info:
runtime error: slice bounds out of range [:8] with capacity 4
panic({0xc5d660, 0xc0003ce0a8})
runtime/panic.go:1038 +0x215
encoding/base64.(*Encoding).Decode(0xc0000ca580, {0xc000418000, 0x5fc7, 0x5fc7}, {0xc0008120d1, 0x7fb4, 0xc000058c00})
encoding/base64/base64.go:483 +0x605
github.com/segmentio/asm/base64.(*Encoding).Decode(0x41259a, {0xc000418000, 0x6a34044efc013184, 0x636f727070410f01}, {0xc0008120d1, 0xb2e589b8e41701b1, 0x0})
github.com/segmentio/[email protected]/base64/base64_amd64.go:138 +0x14d
github.com/segmentio/asm/base64.(*Encoding).DecodeString(0xc00007e370, {0xc0008120d1, 0x7fb4})
github.com/segmentio/[email protected]/base64/base64_amd64.go:148 +0xb7
I am convinced that it is caused by the unsafe convertion which produced incorrect slice capacity.
from asm.
Yep, that was this issue. I've included a few updates to some internal table handling as well, but this issue should be resolved now. I appreciate you reporting this issue to us.
from asm.
Related Issues (14)
- Add documentation
- use x/sys/cpu HOT 1
- "checkptr: pointer arithmetic result points to invalid allocation" on ARM HOT 2
- Try manually assigning registers HOT 3
- Faster tail block loading code far from page boundary
- Assembly version for small strings
- ARM64 work would lead to Apple Silicon support?
- add mem.Count function
- the repo will cause compile error when using go vendor mode HOT 14
- Performance comparison between assembly and cgo
- undefined reference to `github.com/segmentio/asm/cpu.X86' HOT 2
- which version of the avo?
- Granting more permissive license to integrate upstream HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asm.