AccessViolations caused by missing padding (SIMDJSON_PADDING with AVX2)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- backend, performance
Research direction
Start with src/FullyManagedImpl/Utils/stringparsing.cs around line 108 and inspect how SIMDJSON_PADDING is applied to the input byte array before AVX2 parsing. Reproduce the reported access violation with the .NET 5 Windows configuration and confirm that parsing inputs near the end of the buffer completes without requiring the caller's 32-byte workaround.
Written by the indexing model from the issue text.
Description
Using SimdJsonSharp.Managed nuget with a .Net5 console application in VS19 on Windows 10 with AVX2 support i am able to reproduce an access violation with some Json files.
After a first investigation it looks like the expected padding (SIMDJSON_PADDING) doesn't work. My memory window is showing that there were only very few additional bytes added at the end of my json byte array (probably by debug mode).

The value of 'ptr' was pointing to the selected character shown in the memory window / see 'Autos' window bottom left.
The shown decompiled line seems to correspond to: https://github.com/EgorBo/SimdJsonSharp/blob/0786341a50919f33c2a86a47d4a1848713c9d60e/src/FullyManagedImpl/Utils/stringparsing.cs#L108
If it helps i can share the source code and json .
Workaround: Adding the padding of 32 bytes and the end of the input byte array solved this issue.
- Dominant language
- C#
- Stars
- 687
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EgorBo/SimdJsonSharp
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
EgorBo/SimdJsonSharp#23 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
EgorBo/SimdJsonSharp#19 · 3 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
EgorBo/SimdJsonSharp#16 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
EgorBo/SimdJsonSharp#15 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
EgorBo/SimdJsonSharp#13 · 7 comments ·
All issues in EgorBo/SimdJsonSharp
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·