You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the report. For efficiency reasons, simdjson requires a string with a few bytes (simdjson::SIMDJSON_PADDING) at the end, these bytes may be read but their content does not affect the parsing. In practice, it means that the JSON inputs should be stored in a memory region with simdjson::SIMDJSON_PADDING extra bytes at the end. You do not have to set these bytes to specific values though you may want to if you want to avoid runtime warnings with some sanitizers.
The warning from the sanitizer is a false report in this instance. It does not indicate a bug.
I have closed this issue. If the reporter wants to use a memory sanitizer and they want to avoid false reports, they may want to initialize the padding bytes. The padding bytes are definitively read, by design.
Thanks for making your point of view clear. Our team already figured out the solution and thus we're fine as it. For future users, maybe consider at least mentioning this behavior in the docs to save you from further support efforts? Also, it takes a while for others to pinpoint the issue, so I think it would be kind to your lib users to initialize those 64 bytes while technically it's not a bug.
PS.: Thanks for an awesome lib and maintaining it!
To Reproduce
Note: error handling code was removed for brevity:
The last line triggers the msan issue. The commented out memset in the second line prevents it.
simjson 3.1.3 (amalgamation)
Configuration
The text was updated successfully, but these errors were encountered: