Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AccessViolations caused by missing padding (SIMDJSON_PADDING with AVX2) #20

Open
th3ragex opened this issue Jun 2, 2021 · 0 comments
Open

Comments

@th3ragex
Copy link

th3ragex commented Jun 2, 2021

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).

grafik
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:

var v = Avx.LoadVector256(src);

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.

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

No branches or pull requests

1 participant